Question 9
Define a class called ParkingLot with the following description : Instance variables/data members : int vno : To store the ...
Question 8
Define a class named movieMagic with the following description: Instance variables/data members: int year : to store the year ...
Question 7
Design a class RailwayTicket with following description: Instance variables/data members : String name : To store the name of the ...
Question 6
Define a class taximeter having the following description: Data members/instance variables int taxino : to store taxi number String ...
Question 5
Design a CLASS to overload a function sum( ) as follows: (i) int sum(int A, int B) – with ...
Question 4
(i) Write a function to print the Floyds triangle with N rows Example: If N = 5, Output: ...
Question 3
a) Write the output int x=0; do { if(x<3) { x+=2; System.out.println(x); continue; } else { System.out.println(++x); break; } } ...
Question 2
Rewrite the following if else if construct into switch case if( var==1) System.out.println(“good”); else if(var==2) System.out.println(“better”); else if(var==3) System.out.println(“best”); else ...
Question 1
State the difference between if-else if ladder and switch...case. while and do while loop. = and == ...