Starting from:

$25

CSCI203-Lab 1 Arrays Solved

•   To practice solving problems using array 

•   To practice writing solutions to problems in a clear and succinct way

 

Problem
Write a program for the following problem statement:

 

PTR Company has three different branches selling various car dash cam. The manager would like to calculate monthly sales figure for four different dash cam models for all the branches. Create a program that could store all sales figures (unit sold) by each branch and selling price for each model of dash cam. Refer to the following tables:

 

Example of Unit Sold (monthly) (UnitSold array):

 

Dash Cam model
SJ Branch 
PJ Branch 
KL Branch 
RS Pro with GPS
5
4
3
Transcend Drive Pro
2
2
3
H203 1080P
3
2
5
Pioneer
4
5
3
 

Dash Cam selling price (Price array):

 

Dash Cam model
Price (RM)
RS Pro with GPS
730
Transcend Drive Pro
850
H203 1080P
150
Pioneer
350
 

The program stores the unit sold into a two-dimensional array named UnitSold. Every month, the user will enter all sales figures (unit sold) while the price of each model is fixed (refer to the Price array above).

 

After all the input process completed, the program will display the following output (based on the table above):

 

Total gross sales for Branch SJ is: RM …

Total gross sales for Branch PJ is: RM …

Total gross sales for Branch KL is: RM …

 

The highest sales figure is RM … by Branch ..

The most popular dash cam model is ……… with unit sold of .. units.

 

More products