Question: CSCI 2 3 5 0 Course Project Phase 2 : Enhanced Functionality with Methods and Arrays ( 1 0 0 points ) Description: Phase 2

CSCI 2350 Course Project
Phase 2: Enhanced Functionality with Methods and Arrays (100 points) Description:
Phase 2 builds upon Phase 1 by refactoring code to utilize methods for improved organization and introduces arrays for managing multiple student data efficiently.
Students will learn to encapsulate functionalities into methods (addStudent(), viewStudents(),viewAverageGrade()), manage arrays for storing student data, and enhance code readability.
Demonstrates understanding of method declarations, method calls, array initialization, and usage in Java
Use the attached code of completed Phase 1 of the project as a start point for your Phase 2. Instructions:
1. Refactoring with Arrays:
o Introduce an array studentNames to store student names.
o Introduce a 2D array studentGrades to store grades for multiple subjects (assuming 3 subjects). o Initialize these arrays as class-level variables (private static).
2. Implement addStudent() Method:
o Create a method addStudent() to add a student to studentNames and studentGrades arrays.
o Prompt the user to input the student's name and grades for three subjects.
o Store the student's name in the studentNames array and their grades in the corresponding row of
the studentGrades array.
3. Implement viewStudents() Method:
o Create a method viewStudents() to display details of all students stored in the studentNames and studentGrades arrays.
o Iterate through the arrays and display each student's name and their grades for the three subjects. 4. Implement viewAverageGrades() Method:
o Create a method viewAverageGrades() to calculate and display the average grade for each student stored in the studentGrades array.
o Compute the average grade for each student based on their grades for the three subjects and display the results.
5. Modify main Method:
o Refactor the main method to utilize the newly created methods (addStudent(),
viewStudents(), viewAverageGrades()).
o Implement a menu-driven approach using a while loop to repeatedly prompt the user for
operations (add student, view students, view average grades, exit). Deliverables (single java file):
A revised version of StudentGradeManagementSystem.java using methods (addStudent(), viewStudents(), viewAverageGrade()) and arrays (students array) for managing student data.
Include comments in your code to explain key sections, variables, methods, etc.
Error Handling: Implement basic error handling

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!