Question: SWENG 3 1 1 / CMPSC 2 2 1 Object - Oriented Design Lab 6 : Abstract Classes and Polymorphism Objectives: Practice programming using Object

SWENG311/CMPSC221 Object-Oriented Design
Lab 6: Abstract Classes and Polymorphism
Objectives:
Practice programming using Object Oriented design using Abstract classes and polymorphic design.
Instructions:
You are allowed to use IDE to solve this lab.
Write a Java program that solves the following problem, this is a Re-Design from Lab5 where you will need to follow the correct object-oriented design principles.
Answer the following questions as part of your pseudocode section.
a) Use Abstract Classes and Methods in your design.
i) Which Classes you will convert to abstract?
ii) Which methods if any should be abstract from that class?
b) Utilize Polymorphic Design Principles.
i) Which parts and what changes would you make to utilize polymorphic design principles?
Requirements:
All your classes/code Must be written in a single file called Lab6.java.
In the main function,
Main function: Demo your code with
6 Car Objects. 2 Objects from each car type.
One Dealership car Object.
Utilize all dealership methods.
(Except the getters and setters, you are free to use or not. Whatever way you see fit).
The following are the technical requirements for each class you will develop.
Dealership:
Must have at least one constructor.
A method to update/change each attribute in the class.
ONE method to count the number for each car type -(Electric, Gas and Diesel)-in the dealership lot.
 SWENG311/CMPSC221 Object-Oriented Design Lab 6: Abstract Classes and Polymorphism Objectives: Practice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!