Question: JAVA A company manufactures 5 different devices and each device is built using a varying amount of 7 different components. Each device and its required

JAVA

A company manufactures 5 different devices and each device is built using a varying amount of 7 different components. Each device and its required amount of components is listed in the table below.

Components
1 2 3 4 5 6 7
MP3 Player 9 13 4 7 1 14 10

Smart Phone

8

2 12 11 6 15 2

Digital Watch

9 6 7 10 15 8 3

Tablet

12 14 8 15 2 7 8
Portable Gaming System 12 10 3 11 8 3 5

Each component has an individual cost which is listed in the table below.

Components
1 2 3 4 5 6 7
Cost $10.75 $15.27 $5.98 $9.67 $4.32 $12.50 $1.42

Using the information in the tables, your program will calculate some data about the products.

Populating the Data:

Your program will have three arrays:

A 2D array to store the data of the first table

A 1D array to store the names of each product

A 1D array to store the costs of each component.

Practice getting the data into your program in these ways:

Console input with Scanner

File I/O

Using an Initializer List.

Calculations:

Compute and Display the cost of manufacturing each device.

Compute and Display the Device name with the highest cost.

Compute and Display the Device name with the lowest cost.

Practice other calculations as you see fit, i.e. Average number of components per device, Device with the highest / lowest number of components, etc, etc.

Sample Results:

MP3 Player Cost: $580.39 Smart Phone Cost: $510.93 Digital Watch Cost: $495.99 Tablet Cost: $643.17 Portable Gaming System Cost: $485.17 Highest Cost Device: Tablet Lowest Cost Device: Portable Gaming System 

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!