King Abdulaziz University Faculty of Computing and Information Technology Computer Science Department CPCS202, 1 st Term 2016 (Fall 2015) Program 5: FCIT Grade Management System Assigned: Thursday, December 10 th, 2015 Due: Saturday, December 19 th, 2015 Purpose: The purpose of this assignment is to practice arrays and all other previous concepts. Read Carefully: This program is worth 6% of your final grade. WARNING: This is an individual assignment; you must solve it by yourself. Any form of cheating will result in receiving 4% (less than zero) in the program. The deadline for this project is by 11:59 PM on Saturday, December 19 th, 2015. o Note: once the clock becomes 11:59PM, the submission will be closed! Therefore, in reality, you must submit by 11:58 and 59 seconds. LATE SUBMISSION: you are allowed to make a late submission, but there is a penalty. If you submit within 24 hours of the due date (so on Sunday by 11:59PM), you will receive a 25% deduction. You will NOT be able to submit after this date/time. Blackboard Submission: This assignment must be submitted online via blackboard If your file is empty or you upload wrong the file, it will be solely your responsibility, and your grade will be zero. If you face any problem in uploading your program through blackboard, you can send it through the email cpcs202.32@hotmail.com within the due date mentioned above. Your program (source file) should be named as: SectionName_StudentId_ProgramNumber.java Example: LA_1110348_P5.java Discussions: ALL students must attend discussions to discuss your program with the grader. You will be given 10 minutes to demonstrate your program, and questions asked will be related to the working of your program. The assignment discussion will start on Wednesday, December 23 rd and will remain for two days only. For assignment discussion which will be in lecturers office, check the teacher name in blackboard. If you do not show up for discussion, you will get a -4 for the program.
Assignment 5 Description: The management of FCIT is needing a management system for managing the grades of students in the faculty. The system should allow faculty members to perform the following actions: Add student record (id, name, marks, etc.) Remove a student record based on student id or name Print student details (id, name, marks, final grade, grade letter) Print the course statistics (course name, number of students, course average, etc.). Note: the purpose of this assignment is to practice arrays. Therefore, whenever you add a new student record, you will be saving ALL the student information into arrays. For example, each student record will have an ID, a first name, a last name, Exam 1 grade, Exam 2 grade, Final Exam grade, Project grade, and final calculated grade for the course. That is 8 pieces of information. This means 8 arrays! Program 5 Details: Important: There are many cases to consider. Make sure you study the output file CAREFULLY to make sure your program works 100%. The BEST problem-solving strategy is for YOU to study the output and try to understand what is happening and how you can solve it in code. Additionally, we give brief description on the next page for some components of your program. The program will first ask the user to enter the course name and number of students on the course as shown on the sample below: ------- Welcome to the FCIT Grade Management System ------- > Please enter the name of your course (ex: CPCS-284): CPCS-202 > How many students are in your CPCS-202 section: 50 After the user enters the course name and number of students, the program should display the following main menu: ------- FCIT Grade Management System ------- ------- *MAIN MENU* ------- A/a: Enter A or a for Adding a Student R/r: Enter R or r for Removing a Student D/d: Enter D or d for Printing Student Details C/c: Enter C or c for Printing the Course Statistics E/e: Enter E or e for Exiting the Program ----------------------------------------------------------------- > Please enter your choice:
If the user choose A or a, then the program allows the user to enter the following information: studentid, firstname, lastname, grades (exam1, exam2, examfinal, project) o Again, all information is to be stored in an array o For example, if this is the first student added to the system, all the information for this student will go at index 0. The ID will go at index 0 of the ID array. The first name will go at index 0 of the first name array. The last name will go at index 0 of the last name array. And so on. Note: all grades are out of 100 points. And the final grade is out of 100 points. Then your program should compute the final grade based on the following weights: Exam 1 is 20%, Exam 2 is 20%, Final Exam is 35%, and Project is 25%. Your program should also determine the final letter grade and then display the results (Please see the sample output). If the user wants to remove a student record, he can choose R or r. This choice allows the user to remove student record based on the student id or student first name and last name through displaying the following menu: > Enter 1 to remove student by ID number > Enter 2 to remove student by name > Enter 0 to return to the Main Menu > Enter choice: o If the user enters 1, the program ask for student id to be entered and delete the student record if it is found otherwise the error message should be displayed. (See the sample output). o If the user enters 2, the program ask for student first name and last name to be entered and delete the student record if it is found otherwise the error message should be displayed. (See the sample output) o If the user enters 0, the program returns to the main menu. If the user choose D or d, the program allows the user to print the student details based on the student id or student first name and last name trough displaying the following menu: > Enter 1 to search/display student by ID number > Enter 2 to search/display student by name > Enter 0 to return to the Main Menu > Enter choice: o If the user enter 1, the program ask for student id to be entered and display the student details if it is found otherwise the error message should be displayed. (See the sample output) o If the user enter 2, the program ask for student first name and last name to be entered and display the student details if it is found otherwise the error message should be displayed. (See the sample output) o If the user enter 0, the program returns to the main menu.
If the user choose C or c, the program displays the statistics of the course. (See the sample output) If the user choose E or e, the program stop and display the message: Input validation > Thank you for using the FCIT Grade Management System! > Goodbye. If the user enter incorrect choice for any menu, the program should continue to show the menu and display the message " Invalid selection! Please try again". If the user enter the marks does not in the range (0-100), the program display the error message "Invalid input! (must be between 0 and 100)" and enforce the user to enter the correct mark. Methods: You MUST use the following methods in your program: Method name Return type Parameters Function displaymenu Void No parameters Displaying the main menu Allows the user to enter (A, a, R, r, D, d, C or c, E or e) and returns the correct readandverify char No parameters character. If the user inputs a character that is not recognized (NOT from A, a, R, r, D, d, C or c, E or e), then the method should print the message >Invalid selection! Please try again., and it enforces the user to enter the correct character. Allows the user to enter the one mark and returns it if the entered value between 0 and 100 inclusively. Otherwise, the method readstudentsgrade double String : message (represent the name of mark "Exam 1 or Exam 2,...) should print the message >Invalid input! (must be between 0 and 100) and other messages "See the sample output", and it enforces the user to enter the correct mark. computefinalgrades search double int double: exam 1 double: exam 2 double: final exam double : project int[] : id (students Ids array) int : student ID (student id to be searched) int : student count (number of students already registered) Computes and returns the final grade based on the weights mentioned in the program description. Search for student id in the array id and returns the position of the id in the array if it is found. Otherwise, it returns -1.
search deletestudent int Void String[] : first names (students first name array) String[] : last names (students last name array) String : first name (students first name to be searched ) String : last name (students last name to be searched ) int : student count int[] : id String[] : first names String[] : last names double[] : exam 1 double[] : exam 2 double[] : final exam double[] : projects double[] : final grades int : position (position of record to be deleted) int : student count gradeletter Char double: final grade displaystudentinformation printcourseinformation Void Void int : student id String : first name String : last name double: exam 1 double: exam 2 double: final exam double: projects double: final grades String : course name int : student count double[] : final grades Search for student name based on his first name and last name in the arrays first names and last names and returns the position of the name in the array if it is found. Otherwise, it returns -1. Removes the student record at index "position" from all the arrays. Returns the grade latter of this final grade (A or B or C or D or F) Displays the student details (See sample output) Computes course average, number of students has A, students has B, students has C, students has D, students has F and displays the results. (See the sample output) NOTE: You may choose to change the parameters and the return types based on how you feel is best. The parameters mentioned above are simply given to HELP you. If you want to use more parameters, less parameters, or different parameters, the choice is yours!
Grading Details Your program will be graded upon the following criteria: 1) Adhering to the implementation specifications listed on this write-up. 2) Your algorithmic design. 3) Correctness. 4) Your program should include a header comment with the following information: your name, email, course number, section number, assignment title, and date. 5) Your program should look EXACTLY like the sample run given in this PDF. 6) The grade distribution including required methods ( 2% for entering course name and number of students, 4% for displaying main menu, entering and verifying choices 10%, Adding student 20%, removing student 25%, displaying students details 15%, printing course statistics 15%, declaring and creating arrays 4% and 5% for input validation for menus. ``````` Deliverables You should submit one Java file containing the Java code. ***This file should be on the format SectionName_StudentId_AssignmentNumber. If they are not in this format, you will lose points. NOTE: your name, ID, section number AND EMAIL should be included as comments in all files! Suggestions: Read AND fully understand this document BEFORE starting the program! Next, make your algorithm, pseudo code, and flowchart. (do not submit these) Once the solution is 100% clear to you, then begin making your code. Hope this helps. Final suggestion: START EARLY!