Question: C# PROGRAM-- I need help with writing a c# - program that manages data using a 2 dimensional array of integers AND must be menu
C# PROGRAM-- I need help with writing a c# - program that manages data using a 2 dimensional array of integers AND must be menu driven
A certain automobile dealership sells fifteen different models of automobiles and employs ten salesmen. A record of sales for each month can be represented by a table, the first row of which contains the number of sales of each model by salesman 1, the second row contains the number of sales of each model by salesman 2, and so on.
For example the sales table appears as follows:
0 0 2 0 5 6 3 1 3 4 3 3 1 0 2
5 1 9 0 0 2 3 2 2 3 1 4 6 2 1
0 0 0 1 0 0 0 3 1 6 2 1 7 3 2
1 1 1 0 2 2 2 5 2 7 4 2 8 2 1
5 3 2 0 0 0 5 2 1 2 6 6 6 1 4
4 2 1 0 1 1 0 4 4 1 5 5 1 2 1
3 2 5 0 1 2 0 1 3 5 4 3 2 1 2
3 0 7 1 3 5 1 0 6 8 2 2 3 2 1
0 2 6 1 0 2 2 1 1 2 1 5 4 3 0
4 0 2 3 2 1 3 2 3 1 5 4 0 1 0
The system should be menu driven with the following options also .
General Auto Sales
==================
1. Add a new sale
2. Sales Per Salesman by model
3. All Sales Per Salesman
4. All Sales For The Company
5. Exit
QUESTIONS:
1) You should be able to add a new sale.
--When this option is selected a screen pops up:
"Enter Transaction Code:"
A transaction code is a 4 character string. For example 0912 is a valid transaction code. The first two characters represent the salesman code , and the last two characters represent the automobile model code. Once the transaction code is entered at the above prompt, a verification is required check if the entered code is a valid one. If the code is invalid then an error message is displayed. If the entered code is a valid one, the value of the (9,12) location of the table must be incremented by 1. [Note: In C#, array indices start from 0. Therefore 0, 0 location is a valid location for a 2-D array. Therefore 0000 is a valid code.
2) Sales per salesman by model.-- If this option is selected, again, similar transaction code (as described in 1) is entered first. (The verification MUST be done for all options)
Suppose the code 0111 was entered. This is a valid code. This means salesman 01, 11th model. Read the (01,11) location of the 2-D array and display the following information.
Sales Representative Code : 01
Automobile Model : Mirage
Total Sold By This Representative : 4
3) All Sales Per Salesman. This is similar to option 2 except for that all models sold by that representative is displayed.
As an example , say the code 0809 was entered. This is also a valid code. The following information is displayed on the screen
Sales Representative Code : 08
Automobile Model Number Sold
-------------------------- -----------------
Camry 0
Corolla 2
And so forth.
4) Total Sales for the company : A monthly sales report must be produced in a form
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
