Suppose that the application requires you to model students. A student has a name and an address. You are required to keep track of the courses taken by each student, together with the grades (between 0 and 100) for each of the courses. A student shall
Suppose that the application requires you to model students. A student has a name and an address. You are required to keep track of the courses taken by each student, together with the grades (between 0 and 100) for each of the courses. A student shall
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Question 01: Implement the following UML class diagram.
Student
-name:String
-address:String
-numCourses: int - 0
-courses:String[30] = {}
-grades:int[30] - (}
+Student (name:String, address:String)
+getName ():String
+getAddress():String
+setAddress (address:String):void
+tostring():String •-
+addCourseGrade(course:String,grade:int):void
+printGrades ():void
+getAverageGrade():double
"name (address)"
"name coursel:grade1, course2:grade2,..."
Suppose that the application requires you to model students. A student has a name and
an address. You are required to keep track of the courses taken by each student,
together with the grades (between 0 and 100) for each of the courses. A student shall](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fed883e63-205a-4b59-b9a2-49a21c691c8a%2Ff1a7862a-6b6b-4dc2-96a1-56b73378c154%2Fx3w4ln_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Question 01: Implement the following UML class diagram.
Student
-name:String
-address:String
-numCourses: int - 0
-courses:String[30] = {}
-grades:int[30] - (}
+Student (name:String, address:String)
+getName ():String
+getAddress():String
+setAddress (address:String):void
+tostring():String •-
+addCourseGrade(course:String,grade:int):void
+printGrades ():void
+getAverageGrade():double
"name (address)"
"name coursel:grade1, course2:grade2,..."
Suppose that the application requires you to model students. A student has a name and
an address. You are required to keep track of the courses taken by each student,
together with the grades (between 0 and 100) for each of the courses. A student shall
![not take more than 30 courses for the entire program. You are required to print all
course grades, and also the overall average grade.
Methods Description:
Class: Student
addCourseGrade(course : String, grade : int)
This method appends the given
course and grade into the courses
and grades arrays, respectively.
printGrades() : void
It prints the grades of the courses
taken by a student in the following
format:
Course 1: Grade 1
Course 2: Grade 2
getAverageGrade() : double
This method returns the average
grade of all the courses taken by a
student.
Perform the following tasks.
SI
Tasks
Expected Output
1. Create a Student object with the following
information.
Name: Raihan Ahmed
Address: Mirpur
2. Print the student info using the toString() method. Raihan Ahmed (Mirpur)
3. Add the following courses and grades.
CSE115 --- 89
CSE215 -- 57
CSE225 -- 96
4. Print the grades of the courses.
CSE115: 89
CSE215: 57
CSE225: 96
5. Print the average grade.
Average Grade: 80.67](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fed883e63-205a-4b59-b9a2-49a21c691c8a%2Ff1a7862a-6b6b-4dc2-96a1-56b73378c154%2Fwj5ex5b_processed.jpeg&w=3840&q=75)
Transcribed Image Text:not take more than 30 courses for the entire program. You are required to print all
course grades, and also the overall average grade.
Methods Description:
Class: Student
addCourseGrade(course : String, grade : int)
This method appends the given
course and grade into the courses
and grades arrays, respectively.
printGrades() : void
It prints the grades of the courses
taken by a student in the following
format:
Course 1: Grade 1
Course 2: Grade 2
getAverageGrade() : double
This method returns the average
grade of all the courses taken by a
student.
Perform the following tasks.
SI
Tasks
Expected Output
1. Create a Student object with the following
information.
Name: Raihan Ahmed
Address: Mirpur
2. Print the student info using the toString() method. Raihan Ahmed (Mirpur)
3. Add the following courses and grades.
CSE115 --- 89
CSE215 -- 57
CSE225 -- 96
4. Print the grades of the courses.
CSE115: 89
CSE215: 57
CSE225: 96
5. Print the average grade.
Average Grade: 80.67
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY