Answered step by step
Verified Expert Solution
Question
1 Approved Answer
. Question(1) (1) Create class called square that has one instance variable (side) of type integer. a- Include set(of type void) and get (of type
.
Question(1) (1) Create class called square that has one instance variable (side) of type integer. a- Include set(of type void) and get (of type integer) method for the side member. b- Include a method to calculate the area of the square. (2) Write a program that test the class created in part (1). Question(2) Create a class called Student to represent a Student exam grades. The class has 4 instance variables: A String variable for the first name, and three double variables that are used to store a student's exam grades. 1- Include a get and a set method for each of the instance variables in the class. 2- Include a getAverage method that calculates and returns the average of the three exam grades. 3- Write a separate program that creates three Student objects to hold the following data. Exam#1 | Exam#2 | Exam#3 First Name Ahmed 83.0 95.5 90.0 Kareema 75.25 83.0 89.0 Jassim 65.0 70.5 68.0 4- Output the name and average grade for each of the above students.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started