73.6k views
5 votes
You will design a program that manages student records at a university. You will need to use a number of concepts that you learned in class including: use of classes, use of dictionaries and input and output of comma delimited csv files. Input: a) Students MajorsList.csv - contains items listed by row. Each row contains student ID, last name, first name, major, and optionally a disciplinary action indicator b) GPAList.csv -- contains items listed by row. Each row contains student ID and the student GPA. c) GraduationDatesList.csv-contains items listed by row. Each row contains student ID and graduation date. Example Students MajorsList.csv, GPAList.csv and Graduation DatesList.csv are provided for reference. Your code will be expected to work with any group of input files of the appropriate format. Names, majors, GPAs and graduation dates can and will likely be different from the examples provided. You can reuse parts of your code from Part 1. Required Output: 1) Interactive Inventory Query Capability a. Query the user of an item by asking for a major and GPA with a single query. i. Print a message("No such student") if the major is not in the roster, more that one major or GPA is submitted. Ignore any other words, so "smart Computer Science student 3.5" is treated the same as "Computer Science 3.5". ii. Print "Your student(s):" with the student ID, first name, last item, GPA. Do not provide students that have graduated or had disciplinary action. List all the students within 0.1 of the requested GPA. iii. Also print "You may, also, consider:" and provide information about the same student type within 0.25 of the requested GPA. Do not provide students that have graduated or had disciplinary action. iv. If there were no students who satisfied neither ii nor iïi above - provide the information about the student within the requested major with closest GPA to that requested. Do not provide students that have graduated or had disciplinary action V. After output for one query, query the user again. Allow 'q' to quit. 3 1 2. 3 4. 5 6 7 8 А B 305671 Jones 987621 Wong 323232 Rubio 564321 Awful 769889 Boy 156421 McGill 999999 Genius C D E F Bob Electrical Engineering Chen Computer Science Marco Computer Information Systems Student Computer Y Sili Computer Y Tom Electrical Engineering Real Physics A B 1 2 3 156421 305671 323232 564321 769889 987621 999999 3.4 3.1 3.8 2.2 3.9 3.85 4. 5 6 7 8 4 1 2 3 А B 999999 6/1/22 987621 6/1/23 769889 6/1/22 564321 6/1/23 323232 6/1/21 305671 6/1/20 156421 12/1/22 4 5 6 7 o

User Unobf
by
8.2k points

2 Answers

3 votes

Final Answer:

The program will use Python to manage student records through classes, dictionaries, and CSV file handling. It will provide an interactive query system for user input of majors and GPAs, returning student information meeting specific criteria, including closest matches if exact matches aren't found.

Step-by-step explanation:

This program leverages Python's classes, dictionaries, and CSV file handling to manage student records efficiently. By parsing input CSV files for student information, it creates a system capable of interactive queries. Upon user input of a major and GPA, the program filters the student records based on these criteria.

It validates the input, ensuring a single major and GPA are provided. Then, it identifies students matching the given criteria, considering disciplinary actions and graduation dates. It calculates matches within a certain range (0.1 GPA) and suggests similar matches (within 0.25 GPA). If no exact matches are found, it provides information about the student within the requested major with the closest GPA. The program facilitates continuous queries until the user opts to quit by entering 'q'.

By using Python's robust functionalities like classes for data management, dictionaries for efficient storage and retrieval, and CSV handling for input and output, the program ensures streamlined access to student records. It implements strict validation to handle user input, extracting pertinent information while discarding irrelevant data. The system follows specific criteria to filter and present student details, adhering to the outlined guidelines. This program allows for seamless interaction, assisting users in finding relevant student information based on specified majors and GPAs while providing fallback options in case of no direct matches.

User PKlumpp
by
8.2k points
5 votes

Final answer:

A program is required to manage student records with features such as querying by a major and GPA, filtering students, and repetitive user interaction while managing data in csv formats.

Step-by-step explanation:

The student's question pertains to designing a program that manages student records at a university, implementing classes, dictionaries, and input/output of comma delimited csv files. The program's interactive inventory capability should allow querying by major and GPA and provide outputs based on the criteria described, such as matching students with specified majors and GPAs, close GPA matches, excluding graduated or disciplined students, and enabling repetitive queries with the option to quit.

User Sachav
by
8.7k points

No related questions found