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

Activity Inheritance - Polymorphism

The document outlines a programming project for automating the management system at LearnMore University, requiring a Java program to handle student and employee details with an emphasis on code reusability. It includes exercises for developing a furniture order processing system, a library management system for software and hardware books, and a FixedAccount class to calculate interest for different account types. Each exercise focuses on implementing inheritance and polymorphism in Java to enhance functionality and maintainability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Activity Inheritance - Polymorphism

The document outlines a programming project for automating the management system at LearnMore University, requiring a Java program to handle student and employee details with an emphasis on code reusability. It includes exercises for developing a furniture order processing system, a library management system for software and hardware books, and a FixedAccount class to calculate interest for different account types. Each exercise focuses on implementing inheritance and polymorphism in Java to enhance functionality and maintainability.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Activity : Implementing Inheritance and

Polymorphism

Problem Statement
The management of LearnMore University is planning to automate the University management system.
Therefore, Steve Wilkinson, the programmer, has decided to create a Java program that accepts the
student details, such as the first name, last name, age, course enrolled, and student ID. In addition, he
also needs to accept the employee details, such as first name, last name, age, salary, department name,
designation, and employee ID. Steve must ensure the reusability of code. The program must offer a
choice to accept either the student’s or employee’s details. Help Steve to develop the program.

Exercise 1
Furniture and Fittings Company (FFC) manufactures chairs and bookshelves. The customers provide
their specifications for the desired furniture item to the company. The furniture items in the company
have similarcharacteristics, such as price, width, and height. However, for some furniture items,
specific details need to be provided by the customers. Recently, the business of the company has
increased significantly. To handle the increased customer’s orders, FFC has decided to computerize the
order processing system. For this, you need to develop a Java program that accepts the furniture
attributes from the customers, as per the specified furniture items, such as bookshelves and chairs. You
need to develop the program to accept and display the various choices of customers.

Exercise 2
Create a library management system program that will be used to store the details of the software books
andhardware books. For software books, the various pieces of information, such as the author name,
title, price,stock, software version, software name, and number of pages, should be accepted.
For hardware books, the various pieces of information, such as the author name, title, price, number of
pages,stock, hardware category, and publisher, should be accepted. After accepting the details in either
of the book categories, the entered details must be displayed. You need to ensure that code reusability is
implemented in the program.

Exercise 3
Define a FixedAccount class containing the method, calculateInterest(), which calculates the
interest on the balance for a fixed account. In addition, extend the FixedAccount class and override
the calculateInterest()method to calculate the interest for the savings account. The interest rate
for thefixed and savings account are different.

You might also like