CS342 : Data Structures Page 1 of 6 CSC213 – COMPUTER PROGRAMMING II TAKE-HOME TEST 1 Issue Date: Friday 27 November 2020 [10am] Due Date: Tuesday 1 December 2020 [12 Midnight] INSTRUCTIONS 1. Answer...

Your task is to design and implement a program that manages student information stored in threeseparate files, and extracts a report for each student AND a summary for each course.


CS342 : Data Structures Page 1 of 6 CSC213 – COMPUTER PROGRAMMING II TAKE-HOME TEST 1 Issue Date: Friday 27 November 2020 [10am] Due Date: Tuesday 1 December 2020 [12 Midnight] INSTRUCTIONS 1. Answer all questions. 2. The names of all your files( project, source file and output files) should have following format S------(Project Name) S------.txt (data files) S------.csv (csv files) S------.pdf (pdf files) The dashes in file names are the nine digits of your UNESWA student identity number. 3. For each student, a standalone device with working Visual Studio C++ 2017/2019 compiler is required. DO NOT USE ANY OTHER VERSION. A zero grade will be awarded for using any other version. 4. Your program must use simple loops to read and process files – DO NOT USE ADVANCED DATA STRUCTURES LIKE ARRAYS, LISTS or DATABASES. Any program that violates this condition will be awarded a zero grade: Answer the question as it is without modifications: 5. You must work as an individual. All copied or plagiarized work will be penalized. 6. THIS TEST IS ONLY FOR REGISTERD STUDENTS AND MUST BE SUBMITTED ON THE UNESWA MOODLE PLATFORM. Page 2 of 6 PROBLEM STATEMENT Your task is to design and implement a program that manages student information stored in three separate files, and extracts a report for each student AND a summary for each course. The content of the files is as follows:  students.txt – This file contains unique student records consisting of the student identity number, surname and first name.  courses.csv – This file contains unique course records in a comma separated (.csv) file. Each record is described by course code, course description/title and the weighting of the continuous assessment (CA) and examination marks. The weighting/rate is a value between 0 and 1, and the sum of CA and examination weighting must be equal to 1.  enrolments.txt – Each student can register/enrol in one or more courses, and each course can be taken by many students. This file contains the details of each student registration/enrolment including the student identity number, course code, the CA mark and examination mark. The figure that follows shows a sample of each of the three files. For testing purposes, electronic copies of the input files are provided. NOTE: For marking purposes, larger files will be used, therefore your code must be general and should work with any file with similar format. students.txt enronments.txt courses.csv Page 3 of 6 TASK Using Visual Studio C++ 2017/2019 version, design and implement a console-based application that implements a nested-menu system with the following items. MAIN MENU =========== 1. Manage Student Records 2. Manage Enrolment Records 3. Generate Student Reports 4. Generate Course Summaries 5. Exit =========================== The details of each menu item are provided below: MAIN MENU OPTION 1: The Manage Student Records option displays the following sub- menu MANAGE STUDENTS RECORDS SUB-MENU ===================================== 1. Add New Student Record 2. View Student Records 3. Return to Main Menu =========================== Page 4 of 6 NOTES-FOR MAIN MENU OPTION 1 Sub-Menu Option 1: Prompts the user to enter a new student details [student identity number, name and surname] and appends the new record to the end of the students.txt file. All records in the student file must have unique student numbers. Sub-Menu Option 2: Opens the students.txt file and displays all records in the file on standard output. The output must be neatly formatted. Sub-Menu Option 3: returns control to the Main Menu. MAIN MENU OPTION 2: The Manage Enrolment Records option displays the following sub-menu MANAGE ENROLMENT RECORDS SUB-MENU ===================================== 1. Add New Enrolment Record 2. View Enrolment Records 3. Return to MAIN MENU =========================== NOTES-FOR MAIN MENU OPTION 2 Sub-Menu Option 1: Prompts the user to enter a new enrolment details [course code, student identity number, CA mark and exam mark] and appends the new record to the end of the enrolments.txt file. All records in the enrolment file must have unique course code and student number combinations. That is, a student cannot be enrolled in the same course more than once. Sub-Menu Option 2: Opens the enrolments.txt file and displays all records in the file on standard output. The output must be neatly formatted. Sub-Menu Option 3: returns control to the Main Menu. MAIN MENU OPTION 3: The Generate Student Reports option calls a function that repeatedly reads each student record in the students.txt file and extracts all corresponding/matching enrolment records (matched using unique student identity number) from the enrolments.txt file. The course code in the enrolment record is also used to extract and display matching records (matched using unique course code) in the courses.csv file. For each student, the function should produce a student report similar to figure shown below: The program must generate and write all the reports to a single file called S------ _report.txt Page 5 of 6 NOTES-FOR MAIN MENU OPTION 3 1. Using the JSP method, write a pseudocode for the function that generates the student reports. Show all the working and steps of the JSP method. Write your answer in a Microsoft Word editor and save is as a pdf file called S---------_Menu3.pdf 2. Write (and use) a separate function that determines a letter grade for a given mark using the following ranges. A+: 90-100; A: 85-89; A-:80-84; B+: 75-79; B: 70-74; C+: 65-69; C: 60-64; D+: 55-59; D: 50-54; E+: 45-49; E: 40-44; F+: 35-39; F: 0-34. The function takes a single numeric value and returns a letter grade. The function must adequately resolve border line cases (i.e. 49.5 treated as 50 but 49.4 treated as 49). This function is then called in the function that generates the report. 3. The weighted final mark is calculated using the CA rate and Exam rate extracted from the courses.csv file. 4. The function must use simple loops to read and process files – DO NOT USE ADVANCED DATA STRUCTURES LIKE ARRAYS, LISTS or DATABASES. A zero grade will be awarded for ignoring this instruction. 5. The function must be general and work with any set of input files with the same format. Page 6 of 6 MAIN MENU OPTION 4: The Generate Course Summaries option calls a function that repeatedly reads each course record in the course.csv file and extracts all corresponding/matching enrolment records (matched using unique course code) from the enrolments.txt file to display the course summary statistics on standard output in the following format: COURSE SUMMARY STATISTICS ============================== ========================================================================= CID TITLE NUMBER OF STUDENTS COURSE AVERAGE ========================================================================= ------ ------------------------------ --------- ---.-- ------ ------------------------------ --------- ---.-- ------ ------------------------------ --------- ---.-- ------ ------------------------------ --------- ---.-- ------ ------------------------------ --------- ---.-- ========================================================================= TOTAL NUMBER OF STUDENTS:---------- ========================================================================= NOTES-FOR MAIN MENU OPTION 4 1. Using the JSP method, write a pseudocode for the function that generates the course summary statistics. Show all the working and steps of the JSP method. Write your answer in a Microsoft Word editor and save is as a pdf file called S---------_Menu4.pdf 2. The title refers to the course description in the course.csv file. 3. Number of students refers to a count of all students who have a mark in the course. 4. The course average is the total of all the marks recorded for that courses divided by the number of students enrolled in that course. It must be displayed to 2 decimal places. 5. The function must use simple loops to read and process files – DO NOT USE ADVANCED DATA STRUCTURES LIKE ARRAYS, LISTS or DATABASES. A zero grade will be awarded for ignoring this instruction. 6. The function must be general and work with any set of input files with the same format. MAIN MENU OPTION 5: The Exit option stops the program execution. SUBMISSION INSTRUCTIONS 1. Create a _TEST_01_ where vs-version indicates the Visual Studio version (2017 or 2019) you used to implement your code. We shall refer to this as your submission folder. 2. Copy all files and folders (pseudo-code files and project folders) into the submission folder created in 1 above
Nov 30, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here