POS409 Version 1 – Program 4 – Sorting Problem – Screenshot attached – Guaranteed A+
Summary: Create a GUI program that allows users to ingest two files that contain Mission Titles and Box Office Profit data in to two 1d arrays.
Required Program Data: Obtain the required information from “title.txt” and “boxoffice.txt.” I will use different file names to test the code, so do not hard code the file names.
Important concepts to know before you start:
1. The key to this program is to complete tasks in smaller steps. Don’t get ahead of yourself!
a. Read one file into a Listview.
b. Read a one file into an array, and then output the array into the Listview.
c. Add the second file and array into the file read process
d. Implement Sorting
e. Lastly, Add the Summary Functionality.
2. Review how to format strings, Page 153
3. A File Read example, Page 555.
4. Review MSDN for Open File Dialog info:
5. Array’s + Using List Boxes with Arrays and Sorting Arrays:
a. Sorting arrays, page 497
6. Other Examples:
NOTE: If you have to hardcode a path/file name, please know that my configuration *will not* match your personal Windows login. If you must hardcode the path, please hardcode your program path relatively. Meaning, don’t spell the entire path and reference the working directory.
1. Option Strict is coded in ‘Form1.vb.’
2. Rename ‘Form1.vb’ to FirstName_LastName_P4.vb (for example, ‘John_Smith__P4.vb’).
3. Code must compile without Errors/Warnings
4. Create a Help menu bar item that uses a msgbox to show valued info on program usage, rates and program requirements.
5. Program does not encounter runtime errors that results in a crash or console errors
6. A Msgbox is not used in any way for this program (except for Menu->Help)
7. Code is easy to read, ie general programming practice. UI items and variables are named meaningful. Not just, emp3, ckboxA, Label7, button1, txtbox2 etc.
8. Code is well commented and has technical comments.
Name: Jennifer Lucas
Status: Online ⬤
Classes Taken: 3878
9. Clicking the Load button uses multiselect and uses one OpenFileDialog (OFD) to a load user specified path and two files.
10. The OFD starts at Desktop.
11. Figures displayed with a ‘$’ and comma’s.
12. Two 1d Arrays used exclusively (Adjusted Box Office Array and Mission Title Array).
13. Program will sort the Adjusted Box Office Array to (0-9) and (9-0). Not sorting the Listview
14. Program will sort the Mission Title Array to (A-Z) and (Z-A). Not sorting the Listview.
15. The Clear button will clear the arrays, UI and program as if newly launched.
16. Load button will clear existing array/display data and still load data.
17. On the Summary Area, when there are >= 3 entries, display a numbered list the top 1/3rd adjusted total box office mission titles listed from high to low.
18. On the Summary area, ensure that you round down a decimal point for the top 1/3. For example, if 7 entries are present, you will display 2. If 9 present, display 3.