Professional Documents
Culture Documents
The Students Allotted With The Is Available at The End of The Document
The Students Allotted With The Is Available at The End of The Document
The Students Allotted With The Is Available at The End of The Document
Assessment - 2 .
L 31+L32 - Time : 2.00 - 3.30 pm Date : 06/09/2021
Faculty : Prof. A. Anitha
General Instructions
2. Copy the allotted question along with the question number and paste on the word
document, which you are about to submit.
3. Compile both the source (.java) program and (output) files in the same word
document and make it as a single PDF file and upload as a single program. The
program should be followed by its output.
Please follow the deadline and the time. ie. The students have to upload their pdf
before their Lab session or can take at the maximum five minutes after the Lab
session gets over. The Assessment cannot be submitted after the deadline. The Vtop
doesn’t have the option for late submission, so if the student fails to submit the
assignment, the mark for the assignment will be provided as ZERO.
1. Write an abstract class with an abstract method double Pizza (double size, double
beverage). Create a subclass Offer and calculate the bill amount. Create another
subclass Tax to get the CGST,SGSTrates and print the bill as below.
2. Create a super class Point with two instance variable x and y which indicate the x-y
coordinates of the point. It contains a default constructor which initializes a point
in origin and a parameterized constructor which initializes a user-specified point.
Create a sub class Line that extends Point class. The constructor of Line class,
should create a new Point object to denote the end point of the line The starting
point of the line is automatically created when it extends the Point class.