Question: CSCI 2 3 5 0 Course Project Phase 2 : Enhanced Functionality with Methods and Arrays ( 1 0 0 points ) Description: Phase 2
CSCI Course Project
Phase : Enhanced Functionality with Methods and Arrays points Description:
Phase builds upon Phase 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 viewStudentsviewAverageGrade 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 of the project as a start point for your Phase Instructions:
Refactoring with Arrays:
o Introduce an array studentNames to store student names.
o Introduce a D array studentGrades to store grades for multiple subjects assuming subjects o Initialize these arrays as classlevel variables private static
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.
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. 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.
Modify main Method:
o Refactor the main method to utilize the newly created methods addStudent
viewStudents viewAverageGrades
o Implement a menudriven 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
