Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

What is the purpose of the Salary Structure Table?

Answered: 1 week ago

Question

What is the scope and use of a Job Family Table?

Answered: 1 week ago