Question: Store the four arrays shown below in the main method of the demo file. Each array contains 7 0 data. Save the file as Topchyan

Store the four arrays shown below in the main method of
the demo file. Each array contains 70 data. Save the file
as Topchyan_demo14. Write an object of the class type to
transfer the arrays to the class file to compute the results.
Print the outputs from within the demo file.
Create a class called Topchyan_hw14. Write methods to
compute and return values from four of the fifteen parts
(select one from top 4, one from 5-8, one from 9-12, one
from13-15). Name methods accordingly such as if it is part
5, Topchyan5.
Array product contain the names of five products.
Array, quantity contains the number of products bought
such as 10 quantities of the product Socks or Caps etc.
Array, origin and destination contains the names of cities
that the products were originated and shipped to.
Product - Unit Cost
Socks - $4.95
Shoes - $29.95
Caps - $7.95
Ties - $9.95
Watches - $19.95
String []product ={"Ties", "Shoes", "Ties", "Shoes", "Ties",
"Watches", "Watches", "Shoes", "Shoes", "Watches",
"Watches", "Ties", "Caps", "Watches", "Ties", "Shoes",
"Watches", "Caps", "Socks", "Shoes", "Shoes", "Caps",
"Caps", "Ties", "Watches", "Watches", "Ties", "Watches",
"Caps", "Watches", "Watches", "Socks", "Ties", "Watches",
"Socks", "Watches", "Caps", "Shoes", "Ties", "Socks",
"Shoes", "Ties", "Watches", "Socks", "Watches",
"Watches", "Watches", "Watches", "Watches", "Shoes",
"Watches", "Socks", "Ties", "Ties", "Ties", "Shoes",
"Caps", "Caps", "Caps", "Caps", "Ties", "Caps",
"Watches", "Watches", "Caps", "Shoes", "Caps",
"Watches", "Caps", "Shoes"};
int []quantity ={10,9,6,4,10,4,9,6,10,7,3,4,4,9,1,
8,9,1,5,8,7,2,3,4,10,5,6,2,1,7,2,8,6,9,8,8,7,7,
9,10,6,7,8,2,1,7,6,3,3,1,8,4,10,7,1,10,6,9,8,2,
4,6,1,8,2,6,10,2,6,2};
String []destination ={"Summit", "Clifton", "Atco", "Brick",
"Wall", "Newark", "Deal", "Clark", "Edison", "Atco", "Clark",
"Mahwah", "Clark", "Mahwah", "Newark", "Deal", "Atco",
"Clifton", "Edison", "Wall", "Clifton", "Wall", "Summit",
"Wall", "Wall", "Edison", "Wall", "Newark", "Brick", "Wall",
"Clifton", "Clifton", "Summit", "Newark", "Summit",
"Summit", "Deal", "Summit", "Atco", "Brick", "Newark",
"Mahwah", "Deal", "Mahwah", "Clark", "Edison", "Clifton",
"Atco", "Edison", "Clifton", "Clark", "Clark", "Deal",
"Mahwah", "Atco", "Brick", "Edison", "Edison", "Edison",
"Edison", "Edison", "Summit", "Brick", "Atco", "Clark",
"Wall", "Edison", "Clifton", "Deal", "Brick"};
String []origin ={"Union", "Nutley", "Newark", "Newark",
"Nutley", "Union", "Union", "Paramus", "Paramus", "Union",
"Paramus", "Newark", "Union", "Newark", "Paramus",
"Paramus", "Union", "Newark", "Nutley", "Nutley", "Union",
"Union", "Union", "Newark", "Union", "Union", "Nutley",
"Nutley", "Nutley", "Paramus", "Paramus", "Newark",
"Nutley", "Newark", "Union", "Nutley", "Newark", "Nutley",
"Nutley", "Union", "Nutley", "Nutley", "Newark", "Newark",
"Union", "Nutley", "Nutley", "Newark", "Union", "Union",
"Union", "Nutley", "Union", "Nutley", "Nutley", "Paramus",
"Newark", "Nutley", "Union", "Newark", "Nutley",
"Paramus", "Union", "Union", "Union", "Union", "Paramus",
"Nutley", "Union", "Nutley"};
1) Total number of orders of each type of products that
were bought.
2) The total cost of all 70 orders.
3) The total cost of all orders shipped to Wall.
4) The total number of orders shipped to Wall.
5) The total quantity of products shipped to Wall.
6) The total cost of Ties, shipped to Wall.
7) The total cost of the products Ties, Socks and
Watches shipped to Clifton, Brick and Newark.
8) The total number of orders that originated from Union.
9) The total number of orders where each order is $50 or
more.
10) The total number of orders that originated from
Union where each order is $50 or more.
11) The total cost of orders that originated from
Union where each order is $50 or more.
12) The total number of orders that originated from
Union and shipped to Edison.
13) The total cost of orders that originated from
Union and shipped to Edison.
14) The total number of orders that was shipped to all
destinations except to Edison.
15) The total cost of orders that was shipped to all
destinations except to Edison.

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!