Create a class called Student to represent a Student exam grades. The class has four instance variables: A String variable for the name, and three double variables to store three exams grades for the student. Write a mutator method that takes four parameters—A String and three doubles. Use these parameters to initialize the instance variables declared earlier. Write a getAverage method that calculates and returns the average of the three exam grades. Write a separate program that creates 2 Student objects to hold the following data.   First Name Exam#1 Exam#2 Exam#3 Ahmed 83.0 95.5 90.0 Kareema 75.25 83.0 89.0         Output the name and average grade for each of the above students.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 9E
icon
Related questions
Question

Create a class called Student to represent a Student exam grades. The class has four instance variables: A String variable for the name, and three double variables to store three exams grades for the student.

  1. Write a mutator method that takes four parameters—A String and three doubles. Use these parameters to initialize the instance variables declared earlier.
  2. Write a getAverage method that calculates and returns the average of the three exam grades.
  3. Write a separate program that creates 2 Student objects to hold the following data.

 

First Name

Exam#1

Exam#2

Exam#3

Ahmed

83.0

95.5

90.0

Kareema

75.25

83.0

89.0

 

 

 

 

Output the name and average grade for each of the above students.

 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT