Question
HELLO, I NEED THIS PROGRAM TO BE WRITTEN IN C# CONSOLE (VISUAL STUDIO 2015) C# CONSOLE PROGRAM DESCRIPTION: This program allows users to look up
HELLO, I NEED THIS PROGRAM TO BE WRITTEN IN C# CONSOLE (VISUAL STUDIO 2015)
C# CONSOLE
PROGRAM DESCRIPTION:
This program allows users to look up and print out data about CIS 207 student records. Each student record consists of a name and a grade. The project will read information from a file.
Upon Execution - The program should present to the user a menu of options, then carries out their request. Upon completion of the request the menu should again appear until the user chooses the Quit option.
Please notethe last section of this assignment should be the first thing the user sees when the program is executedbut, from a development point of viewyou may want to keep this until the end to develop.
MAIN( ) PROCESSING: Your program should do the following:
FillArrays:
Create 2 parallel arrays: A string array to hold the Student Names and an integer array to hold the Students Grade (from 0 through 100). These are parallel arrays. The first record in the data file contains the number of elements (# of students in the file). Read the first record, create the arrays, then read the remaining records to fill the arrays with their appropriate data.
DisplayMenu:
Display a menu on the screen and accept the Users Selection into a variable. Validate the selection. The program should loop until the user chooses to quit.
Based on the user choice of menu item Call the method/s for the processes and outputs.
The Methods should not be completed in Main( ) and a separate class file must be used for at least 2 of your options. One of those 2 classes must include Backing Fields, Properties and Constructors. (1,2,3) using Private backing fields and methods with appropriate public properties and constructors.
Your other methods can be placed below Main( ) or in separate classes.
When a process is complete display the menu again until the user selected your Quit option
MENU: The menu choices are:
1 Display Student Names and Grades
2 Find & Display All Students with a particular grade (from User Input)
3 Sort by Name and then Display the Students Name and Grade
4 Display the Grade of a Name input
5 - Quit
PROCESSING in greater detail:
Each Menu Choice should be handled by a separate method but each does not require a separate class and avoid redundant code and multiple methods may call a single, reusable, method. Design your program to allow for as much reusability as you can.
1 Display Student Names and Grades. Output each Name and Grade on 1 line with each student on a separate line (oka List!) with headers please.
2- Find & Display All Students with a particular grade and display all the names.
The user should input a grade.
Use a Linear Search that you code for this Search
When you have a successful search (match), display that students name and continue to search for next person with that grade until you find and display all of those student names with the same grade, from input
- if the grade does not exist for any student please display an Appropriate Message
3 - Sort by Name and then Display the Students Name and Grade
Your Choice of Sort methods
Using a coded search routine, sort names (and their associated grades) in alphabetic order by name and then display the names and grades in a list with headers (each name and grade outputs on a separate line).
4 - Display the Grade of a Name input
Prompt and Accept an input Name
Using a Binary search (after sorting!) after sorting the array by name for a bonus 10%)
With a successful search - display that students grade.
If there are multiple students with the same name, you only need to display the grade of the first student encountered with the name. aka: you can exit the search loop upon a single successful match.
If no name matches an unsuccessful search Display an appropriate message.
NOTE: Remember the CompareTo to compare two strings. Chpt 4 has reference to this also
a Swap should swap both the name and grade array fields. We are using parallel arrays
INPUT FILE (start with this to select the file you plan to use) look at the data for run time/testing purposes!:
The input file is a text file that contains student records with names and grades. There are 2 files LittleRecords2.txt and BigRecord2.txt
The first field in the first record contains the number of students in this student record file so you will need to
read first record then create and load arrays
So, the first field in the first record is the size you will need to make your Name & Grade arrays.
Each record read contains 2 fields, comma delimited. The first field is the name and the second is that persons grade.
You will note in BigRecord.txt that the names are just random characters use your imaginations J.
This is a serial/flat file and Names and Grades are Unsorted.
You can test your program with the following files:
BigRecord2 - large file with random characters for their names
LittleRecord2 smaller file with real names.
Test your program using both but you do not need to allow for both files to be read in 1 execution. Its ok to do the whole run/execution with only 1 of the files.
At the execution of the program have the user select either BigRecord or LittleRecord or Exit from a small, one time displayed, menu. Then you will load your arrays and enter the Main Menu loop of your program the 5 choices.
HERE'S A SCREEN SHOT OF THE FILE LittleRecords2.txt
HERE'S A SCREEN SHOT OF THE FILE BigRecord2.txt
M c Final Progra x Lgoogl.cor George,94 M c Final Progra x Lgoogl.cor George,94Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started