100%(1)1 out of 1 people found this document helpful
This preview shows page 1 - 2 out of 2 pages.
The preview shows page 1 - 2 out of 2 pages.
The program below is the answer to Deitel's Java How to Program (9th Edition) Chapter 3 Exercise 3.11.Question: Modify class GradeBook (Fig. 3.10) as follows:1.Include a String instance variable that represents the name of the course’s instructor.2.Provide a set method to change the instructor’s name and a get method toretrieve it.3.Modify the constructor to specify two parameters — one for the course name and one for the instructor’s name.4.Modify method displayMessage to output the welcome message and course name, followed by "This course is presented by: " and the instructor’s name.Use your modified class in a test application that demonstrates the class’s new capabilities.To run the application save both files with the same name as the class (because it is a public class) and with the .java file extension (in this case Ex03_11.java and Ex03_11_Test.java). Then compile both classesand run Ex03_11_Test. Ex03_11 will not run because it does not have a main method.