This assignment is to brush up on your OOP skills. OOP is all about abstraction, encapsulation, inheritance and polymorphism. Use Java, C#, VB. Net, or C++ to write the code for this description ...


This assignment is to brush up on your OOP skills. OOP is all about abstraction, encapsulation, inheritance and polymorphism. Use Java, C#, VB. Net, or C++ to write the code for this description



CompX is a company that sells two main types of computing machines, Desktops and laptops. All desktops come in two types. Regular desktops and all in one (AIO) Desktops. Regular desktops will have a CPU type and speed, RAM capacity, at least one secondary storage device (HDD or SSD), each of these will have a type and capacity. A regular desktop will also have a form factor (ATX, Micro-ATX, or a mini ITX). AIO will have the same except for a form factor and will have only one secondary drive but will have a screen size and type (touch vs. non-touch). AIO has also speakers.


Laptops will have a CPU type and speed, RAM capacity, CompX only sells laptops with one secondary drive. Laptops will also have Wifi card type and speakers. Laptops will have a screen size and type (touch vs. non-touch.




Your job is to create the classes needed to map the objects in the description above to code showing OOP practice.



Abstraction: The abstraction comes from the base class machine that will have a method (or function) called public abstract string getDescription(); // returns the description of a particular machine



Encapsulation: Need to show the proper data and operation on it as well as the access modifiers. Using C# properties makes your life easier in coding (the compiler does a lot of the work)



Inheritance: Make sure to reuse as much as possible. Do not forget to “override getDescription()”



Polymorphism: You need to show that you use a base class reference to refer to a subclass object. For this assignment, create a driver program that shows polymorphic behavior by creating several instances from your classes and then referencing to these objects with a base class reference


Your code will have several classes plus the main (driver) class in it. Provide any documentation behind the rational used for your coding style or design.


Please, do not forget about the comments.

Feb 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here