Labs and Exercises of OOP Course

Lab1

Take input from command line

Lab2

Write the java code that prints the sum of 2 numbers taken from the keyboard to the screen.

Write the java code that writes 2 string expressions taken from the keyboard one after the other.

Lab3

Write the java code that calculates the circumference and area of the circle. Pi value will be used by making use of java libraries. The radius value must be entered by the user.

Implement the following equations in java programming language to understand the operation and operator precedence.

Lab4

Write the java code that finds the number of 'a' characters and the number of uppercase characters in a paragraph entered from the screen.

Lab4.1

Write the java code that extracts the "Programming Lesson" part from the String given as "Java Programming Lesson Fall 2012" and prints it to the screen. You have to use indexOf and subString APIs for this.

Lab5

Write the java code that converts a 10-element integer array into an ArrayList list of numbers.

Write the java code that copies an integer array, whose element number and values are entered by the user, into another array, finds the average of the elements of the copied array and writes it to the screen.

Write the java code that the elements of a 3x2 matrix are entered by the user and printed on the screen.