Create a NetBeans project named Lab4 Yourld. Create a class named Student stored in a file named Student.java and provide a tester class named Lab4_Yourld.java. For the purpose of this exercise, a student has a name, number of quizzes taken by a student and a total quiz score. Define appropriate instance variables to hold student information. Provide the following as the public interface of class Student:

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter11: Exception Handling
Section: Chapter Questions
Problem 4E
icon
Related questions
Question
Exercise 1:
Create a NetBeans project named Lab4 Yourld. Create a class named Student stored in a file named
Student java and provide a tester class named Lab4_Yourld.java.
For the purpose of this exercise, a student has a name, number of quizzes taken by a student and a total quiz
score. Define appropriate instance variables to hold student information, Provide the following as the public
interface of class Student:
A constructor that reccives a string value to initialize a student's name. It initializes other instance
variables to thcir default valucs.
• getName() method: returns the student's name
setName(String studentName) method that receives a string value and assign it to the student's namd
addQuiz(double score) method that adds the received quiz score to the total score and increments the
number of quizzes taken.
getTotalScore() method: returns the student's total quiz score
getAverageScore() returns the average score that is equal to the total quiz score divided by the number
of quizzes taken.
toString() method that returns a string describing a Student's object information as follows:
Name: Maryam Abdullah, number of quizzes taken = 3, average quiz score =
=8.00
Provide documentation comments for your class and class constructor(s) and method(s) using the Java standard
form for documentation comments discussed in this course
In the tester class, create two Student objects one of which holds your name, then call addQuiz() method several
times to add quizzes' scores to cach student, and finally, print objects information as shown in the sample run.
Use the following information to represent both students' objects.
Student1 namne: Mariam Abdullah took three quizzes of scores 8, 7 and 9.
Student2 name: write your name, took four quizzes of scores 10, 9, 9.5, and 10.
Use method setName() to change the name of the student "Mariam Abdullah" to "Maryam Abdullah".
Figure 1 shows a sample run of a tester class.
Student1 Name: Mariam Abdullah
Number o£ quirze taken:3
Total score: 24.0
Average acoze: B.00
H E
Student2 Name: Waleed Salim
Number oi quizz= taken:
Toral score: 38.5
Nae Maryan Abdulah, nunter of qu aken = 3, Nzaga acEN 8.00
Name Walead Sal n.
The average 2cere of both atudent
Figurel: A sample run of a tester elass.
Transcribed Image Text:Exercise 1: Create a NetBeans project named Lab4 Yourld. Create a class named Student stored in a file named Student java and provide a tester class named Lab4_Yourld.java. For the purpose of this exercise, a student has a name, number of quizzes taken by a student and a total quiz score. Define appropriate instance variables to hold student information, Provide the following as the public interface of class Student: A constructor that reccives a string value to initialize a student's name. It initializes other instance variables to thcir default valucs. • getName() method: returns the student's name setName(String studentName) method that receives a string value and assign it to the student's namd addQuiz(double score) method that adds the received quiz score to the total score and increments the number of quizzes taken. getTotalScore() method: returns the student's total quiz score getAverageScore() returns the average score that is equal to the total quiz score divided by the number of quizzes taken. toString() method that returns a string describing a Student's object information as follows: Name: Maryam Abdullah, number of quizzes taken = 3, average quiz score = =8.00 Provide documentation comments for your class and class constructor(s) and method(s) using the Java standard form for documentation comments discussed in this course In the tester class, create two Student objects one of which holds your name, then call addQuiz() method several times to add quizzes' scores to cach student, and finally, print objects information as shown in the sample run. Use the following information to represent both students' objects. Student1 namne: Mariam Abdullah took three quizzes of scores 8, 7 and 9. Student2 name: write your name, took four quizzes of scores 10, 9, 9.5, and 10. Use method setName() to change the name of the student "Mariam Abdullah" to "Maryam Abdullah". Figure 1 shows a sample run of a tester class. Student1 Name: Mariam Abdullah Number o£ quirze taken:3 Total score: 24.0 Average acoze: B.00 H E Student2 Name: Waleed Salim Number oi quizz= taken: Toral score: 38.5 Nae Maryan Abdulah, nunter of qu aken = 3, Nzaga acEN 8.00 Name Walead Sal n. The average 2cere of both atudent Figurel: A sample run of a tester elass.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Development strategies
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,