[go: up one dir, main page]

0% found this document useful (0 votes)
8 views1 page

Fast Learner's Assignment MST-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Fast Learner's Assignment MST-1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

ASSIGNMENT FOR FAST LEARNER’S

1. Model a library management system with classes for books, authors, and library
members. Incorporate concepts like inheritance and polymorphism to represent
different types of books and users.
2. Create a program that simulates a traffic control system using object-oriented
principles. Model vehicles, traffic lights, and intersections, and demonstrate the
coordination of multiple objects.
3. Implement a program that converts between different units of measurement (e.g.,
length, weight, temperature) with user input validation using custom exception
classes.
4. Define an abstract class Vehicle with fields like registrationNumber, make, and
abstract methods such as start(), stop(). Create concrete subclasses like Car,
Motorcycle, and Truck that extend the abstract class. Override the abstract methods
to provide specific behaviour for starting and stopping each type of vehicle.
5. Create an abstract class Logger with methods like logMessage() and logError().
Implement concrete subclasses representing different logging mechanisms (e.g.,
FileLogger, DatabaseLogger). Handle exceptions for log file creation failures,
database connection issues, and invalid log messages.
6. Implement a hierarchical class structure for a university system with classes such as
Person, Student, Professor, and Course. Demonstrate the use of inheritance,
abstraction, and encapsulation.
7. Develop a complex Java program that involves multiple levels of method overriding
and overloading. Create a scenario where polymorphism plays a crucial role in
handling different types of objects.
8. Design a program that reads a complex mathematical expression as a string, parses it,
and evaluates the result. Implement custom exceptions for handling syntax errors and
division by zero.
9. Design an abstract class LibraryItem with attributes like title, author, and abstract
methods like checkout() and returnItem(). Extend the abstract class with concrete
classes for different types of library items (e.g., Book, DVD). Implement methods for
checking out and returning items.
10. Create an abstract class Reservation with methods like makeReservation() and
cancelReservation(). Implement concrete subclasses representing different types of
reservations (e.g., HotelReservation, FlightReservation). Handle exceptions for
reservation conflicts, invalid inputs, and cancellations.

You might also like