End Semester (2023)
End Semester (2023)
MANIPAL INSTITUTE
A constituent unit of MAHE,
OF TECHNOLOGY
Maniah
I|SEMESTER MCA
INTERNAL EXAMINATIONS MARCH 2023
TEST -1
SUBJECT: Java Programming (MCA 4253]
Date of Exam:
15/03/2023 Time of Exam: 10.30 AM- 11.30 AM Max, Marks: 15
Instructions to Candidates:
Answer ALL the questions & missing data may be
suitably assumed
Grade A+ B D
Display
the above the total
scenario usingmarks andmethod
dynamic grade. Use an aray of objccts to process the results of 'n' students. Implement
dispatch.
Page 1 ofi
I| SEMESTER MCA INTERNAL EXAMINATIONS APRIL 2023
TEST-2
SUBJECT: Java Programming [MCA 4253]
Date of Exam: 19/04/2023 Time of Examn: 10.30 AM -11.30 AM Max. Marks: 15
Instructions to Candidates:
Answer ALL the questions & missing data may be suitably assumed
1. What are the access specifiers/modifier for fields and methods of an interface?
try
{ System. out.print ("Exception" +" *+ 1 / o) : )
catch (ArithmeticException e)
( System. out.print ("handled") : )
6. With the help of a suitable example, discuss the importance of thread join operation. 2
7. Assume that you are creating a class AAA with a method int abc). In the method abc0 you are invoking a 2
method void pqr) belonging to another class XYZ. Assume that in class XYZ it is mentioned that the method
Pgr Othrows two exceptions Eypl and Exp2. Write two kind of the code structure for class AAA to make use of
the method pqr).
8 Write a java program using interfaces to calculate Total on road payable price of acar along with some 3
accessory items. Assume we have two interfaces: on_ road price and accessoryprice. The interface
on road price is used to calculate Total on road price using car base price, road tax and insurance amount. The
interface accessory price calculates total price of accessories based on accessories fitted to the car and GST
tax(89%).
The road tax and insurance are calculated as 10% 4% of base price of car input by user.
The price information of accessories are as follows:
Infotainment: Rs 200.00, reverse camera: Rs 120.00, fog lamp: Rs 100.00.
Total on road payable price of acar =Total On road price +Total price of accessories with GST.
User may create an object passing base price and name of accessories required. Example: Objectl (2000.
"infotainment") or Object2 (3000, "infotainment", "ReverseCamera'")
Depending on the car base price &accessories selected calculate and display Total on road payable price of the
car.
Page I ofi
Reg. No.