Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete Java program and design a class named Computer which has ( HDD , Ram, and CPU. ) This class helps the users

Write a complete Java program and design a class named "Computer" which has (HDD, Ram, and CPU.)
This class helps the users to estimate the price of a computer, based on its specifications.
Represent the following items as classes:
1- Hard Disk Drive class, which includes these attributes: (HDD type - SSD or Physical-Drive, Size, and Speed).
Use the following information to help you to calculate the cost of the HDD:
Seagate Hard Drive Prices By Size
DRIVE SIZE MODEL PRICE COST/GB
1 TB ST1000DM010 $49.99 $0.050
2 TB ST2000DM006 $66.99 $0.033
3 TB ST3000DM008 $83.72 $0.028
4 TB ST4000DM005 $99.99 $0.025
6 TB ST6000DM004 $240.00 $0.040
8 TB ST8000DM005 $307.34 $0.038
2- CPU class, which includes these attributes (CPU speed, CPU cache memory size, price).
Note: Do your research and put the right price for the CPU.
* The RAM is a data field in the Computer class to represent the size of the memory.
* Add setters and getters for all of these classes.
* Overload the toString in the Class Computer to print the total Price.
In the main create one object of type Computer and display the total price based on the user input.
Note: You should display a menu for the user to choose the computer options.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions