Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import java.util.Scanner; create a public class student which models a student having courses and grades. The student class has two variables name and address. The

import java.util.Scanner;

create a public class student which models a student having courses and grades. The student class has two variables name and address. The courses taken and grades for the courses are kept in 2 parallel arrays. The maximum number of courses taken by student is 30. Create a constructor public Student(String name, String address). You can also initialize number of courses and the grades array. Create the public getters and setters public String getName(), public String getAddress(), public void setAddress(String address). No setter for name as it is not designed to be changed. Print the name and address of student Write a method to add a course and grade for the student public void addCourseGrade( String course, int grade) Print all courses taken and their grades by writing a method public void print- Grades() Write a method to compute the average grade for the student public double getAverageGrade() The console output will look like this. Jim(1 Happy Ave) Jim(8 maple, vaughan) Jim 8 maple, vaughan Jim IM101:89 IM102:57 IM103:96 The average grade is 80.67

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions