CLI: STEP 1

1. Print a multiplication table.

2. Print a multiplication table as shown below.

0
0 2
0 3 6
0 4 8 12
0 5 10 15 20
0 6 12 18 24 30
0 7 14 21 28 35 42

3. Write a program to convert 69 Fahrenheit to Centigrade.

4. Write a program to convert 69 Centigrade to Fahrenheit.

5. Write a program to calculate the factorial of 10.

6. Find the cube of numbers between 1 and 10.

7. Find the area of circle whose radius is 10.

8. Write a program to calculate the sum of the odd integers between 1 and 99 using the loop.

9. Write a program to get the following output. 

^^^^^
#####
^^^^^
#####
^^^^^

10. Write a program to swap two numbers without using any temporary variable.

   Explanation: if  a = 15 and b= 20 then your program should show as output, a = 20 and b = 15 and you should not use any other variable except a and b

11. Write a program to print first five rows of Pascal's Triangle as shown below. 

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1

 

CLI: STEP 2

1. Write a program to accept the command line arguments and print them.

2. Write a program that has a method/function/subprogram for calculating the fourth power of 2.

3. Write a program that initializes two variables and has a method/function/subprogram to display their values.

4. Write a program that will print details about the current date, time, month, yesr, day of the month, day of the week.

5. Write a program that will display a message "Hello World!".

 

CLI: STEP 3

1. Write a program that will print the months of the year. The months of the year should be held in array.

2. Write a program that will test equality between two strings.

3. Write a program that will concatenate two strings.

4. Write a program that will find the length of the string.

5. Write a program that will replace the i's with o's in a string.

6. Write a program that will convert the string to upper case.

7. Write a program that make two arrays. One with names of the computer hardware components and other with their prices. The program should then display the products with their corresponding prices.

8. Write a program that has overloaded methods/functions/subprograms. The first method should accept no argument, the second method will accept one argument as a string and the third method should accept two arguments in the form of a string and an integer. The first method should display "My school is awesome!". The second method should display "I am doing great in Computing!". The third method should display "Working hard is key to success!" five times.

9. Write a program that displays a 3x3 matrix that is made up of numbers from 0 to 9 (digits are not repeated).

10. Write a program that will print the subscript of the array and the corresponding element.

11. Write a program that will sort the elements of the array in ascending order.

 

CLI: STEP 4

1. Create a class called "Numeral" that accepts an array of ten numbers. Create a sub class called "NumPlay" which has a menu as follows

      a. Display Numbers entered 

      b. Sum of numbers entered

      c. Average of numbers entered

      d. Maximum number

      e. Minimum number

      f. exit

      Create appropriate method in the sub class to evaluate the operations as per our choice and it should continue until we chose exit.

2. Create a base class called "Shape". It should contain two methods "getCoord()" and "showCoord" to accept the x and y coordinates and show them respectively. Create a sub class "Rect". It should also contain a method called showCoord() to display the length and breadth of the triangle. The onscreen printing should show that the x and y coordinates are being printed from class and from subclass separately. 

3. Create a class called "Car" Initialise the color and the body to "Silver" and "Sedan" respectively. There should be two constructors. One is the default constructor that creates the silver sedan. The other constructor should take two arguments (colour and body). Write a method "toString" that returns colour and body. Write a sub class "funCar" that has two constructors too. Call the base class constructors from these two constructors. Execute the class to display the following

My car is a silver sedan

My wife's car is a red convertible

 

CLI: STEP 5

1. Read a text file (create one with few lines of random text) and display the contents

2. Write an string into a text file called WriteInMe.txt

3. Create two text files and name them as original.txt and encrypted.txt. Write a program to read original.txt, encrypt it and then write it to encrypted.txt. Write another program to reverse the process. This program should read the encrypted.txt and change it back to the original content but this time the file should be written to recovered.txt.

 

CLI: STEP 6

1. Write a program o accept a file name as command line parameter. Check whether this file exist in a specific directory.

2. Write a program o accept a file name as command line parameter. Check whether this file exist in a specific directory. If the file is found change its name to found.txt.

3. Write a program to accept a word of ten characters into an array. If the accepted characters are in lower case then they should be converted to uppercase and vice-versa.

4.