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

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 ST
1
0
0
0
DM
0
1
0
$
4
9
.
9
9
$
0
.
0
5
0
2
TB ST
2
0
0
0
DM
0
0
6
$
6
6
.
9
9
$
0
.
0
3
3
3
TB ST
3
0
0
0
DM
0
0
8
$
8
3
.
7
2
$
0
.
0
2
8
4
TB ST
4
0
0
0
DM
0
0
5
$
9
9
.
9
9
$
0
.
0
2
5
6
TB ST
6
0
0
0
DM
0
0
4
$
2
4
0
.
0
0
$
0
.
0
4
0
8
TB ST
8
0
0
0
DM
0
0
5
$
3
0
7
.
3
4
$
0
.
0
3
8
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

Step: 3

blur-text-image

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

Database And Expert Systems Applications Dexa 2021 Workshops Biokdd Iwcfs Mlkgraphs Al Cares Protime Alsys 2021 Virtual Event September 27 30 2021 Proceedings

Authors: Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil ,Bernhard Moser ,Atif Mashkoor ,Johannes Sametinger ,Anna Fensel ,Jorge Martinez-Gil ,Lukas Fischer

1st Edition

3030871002, 978-3030871000

More Books

Students also viewed these Databases questions