I have an assignment due tonight. i don't have any idea how to solve this :( need help. Here is the assignment:
Problem statements:
Stock exchange provides raw data file that contain information regarding the shares of different company on a daily basic to the newspaper companies. The newspaper companies need to extract that file and read the data to publish in their newspaper. Recently, the newspaper company wants to develop special software for their customers. The software needs to read data from the data file given by the stock exchange and store those data. The software should have the capability to display the information based on different criteria. The display can be based on names of the companies, price of the share, number of the transactions, change positive, change negative and finally based on the transaction value. For an example a user wants to see the list of the shares according to the transaction volume of the shares (i.e., the share that has maximum transaction value should appear first).
Step by step conversion:
First and most important part is to read the share file. Below we provide the format of the share file
Number of share traded
Name of the share;code;lot/face value;high value;low value;avg value;change percent%;number of transaction;total share trade
The file starts with a number. This number represent total number of companies participated on that day. From this number we can identify numbers of line to read. Each line of the file contains information regarding each company. First attribute is the name of the company (e.g., Arab Bangladesh Bank Ltd.), second attribute is short name of the company or code of the company (e.g., ABBANK), then we have the lot of the share and face value of the share. In this way all other information is provided (please see the format for details). Each and every attribute is separated with a semicolon (;) except the lot and total share transfer.
Second part is storing these information. Please use suitable data type to store all the information. Below the size or maximum value of the attributes are provided. Name of the share (30 characters), code(10 characters), lot (>1, <500), face value (>=5, <=500), high value, low value and avg value (>0.00, <40000.00), change percent (any positive of negative fraction number with percent sign), number of transaction (any positive whole number), total share trade (any positive whole number).
Once the information are stored the user may wants to see them according to their own requirements. For an example a user wants to find out 10 best performing share (i.e., the shares that have highest change percent). Similarly, a user may want to see the shares that have highest transactions. Below the list of choices are given:
1. Show all shares according to their name, code and avg value.
2. Show 10 best and worst performing shares (based on the change percent).
3. Show 10 best and worst performing shares (based on the number of transaction)
4. Show 10 best and worst performing shares (based on the total transaction value)
You also need to record the changes during the transaction day and update the changes in the data and store in a separate file. The changes that may required by the user are given below:
1. Change in share price (average, high, low).
2. Change in lot/face value
3. Change in number of shares or transactions.
After making the changes in different shares you have to store the data in a new file where the new file name will be provided by the user at the beginning of the changes you made.
Writing code:
You have to use Object oriented concept and implement all the functions with required overloading for this Assignment.
Program requirement:
1. Computation of correct result.
2. Optimize coding.
3. Proper name of the variables and constants used in the program.
4. Optimum use of variables and constants.
5. Proper comments in the program to understand the steps better.
6. Correct indentation to follow the blocks easily.
Typical output Screen:
Provide the file name: share01.in
Thanks for the valid file……
Please choose from the following:
1. Display Options
2. Change Options
3. Exit Program
Enter your Option: 1
Please choose from the following Display options:
1. Show all shares according to their name.
2. Show all shares according to their code.
3. Show all the shares according to their avg value.
4. Show 10 best performing shares (change percent).
5. Show 10 best performing shares (number of transaction)
6. Show 10 best performing shares (total transaction value)
7. Show 10 worst performing shares (change percent)
8. Go to Change Options.
9. Go to Main Menu
Please choose from the following Change options:
1. Change in price.
2. Change in Lot.
3. Change in Face Value.
4. Change is Volumns.
5. Go to Display Options.
6. Go to Main Menu
Enter your choice (1-6): 1
Enter Company Code: FEDERALINS
Enter New Avg Price: 140.75
Valid Company code... Data has been updated.
Enter your choice (1-6): 6
Please choose from the following:
1. Display Options
2. Change Options
3. Exit Program
Please choose from the following:
1. Display Options
2. Change Options
3. Exit Program
Enter your Option: 7
Invalid choice….
Please choose from the following:
1. Display Options
2. Change Options
3. Exit Program
Enter your Option: 1
Please choose from the following Display options:
1. Show all shares according to their name.
2. Show all shares according to their code.
3. Show all the shares according to their avg value.
4. Show 10 best performing shares (change percent).
5. Show 10 best performing shares (number of transaction)
6. Show 10 best performing shares (total transaction value)
7. Show 10 worst performing shares (change percent)
8. Go to Change Options.
Enter your choice (1-8): 12
Invalid choice….
Enter your choice (1-8): 8
Please choose from the following Change options:
1. Change in price.
2. Change in Lot.
3. Change in Face Value.
4. Change is Volumns.
5. Go to Display Options.