Use your modified class in a test app that demonstrates the class’s new capabilities. NOTE: You will need both a GradeBook file and a GradeBookTest file.
The code from GradeBookTest.cs is:
// Exercise 4.10 Solution: GradeBookTest.cs
// GradeBook constructor used to specify the course
name
// and instructor name at the time each GradeBook object is
created.
using System;
public class GradeBookTest
{
// Main method begins program execution
public static void Main( string[] args
)
{
// create GradeBook
object
GradeBook gradeBook1 = new
GradeBook(
"CS101
Introduction to C# Programming", "Sam Smith" );
gradeBook1.DisplayMessage(); // display welcome message
Console.WriteLine( "\nChanging
instructor name to Judy Jones\n" );
gradeBook1.InstructorName =
"Judy Jones";
gradeBook1.DisplayMessage();
// display welcome message
} // end Main
} // end class GradeBookTest
//GradeBook.cs
using System;
class GradeBook
{
public string title;
public string InstructorName;
public GradeBook(string tit,string aut)
{
title=tit;
InstructorName=aut;
}
public void DisplayMessage()
{
Console.WriteLine("#########Welcome#########");
Console.WriteLine("Course name: "+title);
Console.WriteLine("This course is presented by: "+InstructorName);
}
}
==========================================================================
using System;
public class GradeBookTest
{
// Main method begins program execution
public static void Main( string[] args )
{
// create GradeBook object
GradeBook gradeBook1 = new GradeBook(
"CS101 Introduction to C# Programming", "Sam Smith" );
gradeBook1.DisplayMessage(); // display welcome message
Console.WriteLine( "\nChanging instructor name to Judy Jones\n" );
gradeBook1.InstructorName = "Judy Jones";
gradeBook1.DisplayMessage(); // display welcome message
} // end Main
} // end class GradeBookTest
================================
//Output
#########Welcome#########
Course name: CS101 Introduction to C# Programming
This course is presented by: Sam Smith
Changing instructor name to Judy Jones
#########Welcome#########
Course name: CS101 Introduction to C# Programming
This course is presented by: Judy Jones
Include a second string auto-implemented property that represents the name of the course’s instructor. Modify the...
I am really struggling to understand this problem! Can someone show how to work this problem out correctly? This is a C++ problem; I am using Code::Blocks; Course Name is: Introduction to Engineering and Computing; Instructor Name: Wenbin Luo 3.11 (Modifying Class GradeBook) Modify class GradeBook (Figs. 3.11–3.12) as follows: a) Include a second string data member that represents the course instructor’s name. b) Provide a set function to change the instructor’s name and a get function to...
JAVA /** * This class stores information about an instructor. */ public class Instructor { private String lastName, // Last name firstName, // First name officeNumber; // Office number /** * This constructor accepts arguments for the * last name, first name, and office number. */ public Instructor(String lname, String fname, String office) { lastName = lname; firstName = fname; officeNumber = office; } /** * The set method sets each field. */ public void set(String lname, String fname, String...
Course Class Create a class called Course. It will not have a main method; it is a business class. Put in your documentation comments at the top. Be sure to include your name. Course must have the following instance variables named as shown in the table: Variable name Description crn A unique number given each semester to a section (stands for Course Registration Number) subject A 4-letter abbreviation for the course (e.g., ITEC, PHED, CHEM) number A 4-digit number associated...
java programming how would i modify the code below to add a GUI (with a main menu with graphics and buttons, etc...) and include an option to print a list of all students added in a grid format and short by name, course, instructor, and location. ///main public static void main(String[] args) { Scanner in = new Scanner(System.in); ArrayList<Student>students = new ArrayList<>(); int choice; while(true) { displayMenu(); choice = in.nextInt(); switch(choice) { case 1: in.nextLine(); System.out.println("Enter Student Name"); String name...
Course, Schedule, and ScheduleTester (100%) Write a JAVA program that meets the following requirements: Course Class Create a class called Course. It will not have a main method; it is a business class. Put in your documentation comments at the top. Be sure to include your name. Course must have the following instance variables named as shown in the table: Variable name Description crn A unique number given each semester to a section (stands for Course Registration Number) subject A...
1) Introduction to Objects (with Constructors and Properties) We need to answer the question which are below. and instruction are given down starting with part(b). Just we need to copy paste code file and follow the instruction and answer related to them. a) Enter the following program.Answer The questions below the codes, Notice that it consists of two classes that will go into the same project. Please put each class into its own code file (use Lab5_1 for the Project...
public class EmployeeDriver public static void main(String[] args) 1/declare create an Employee object named joo. Une no-arg constructor 1/change the attributes for joe as the following: //name to Joe Cool, id to 1111111, hours to 20, pay rate to 15 //dealare & create another Employee oblegt named one using arg-constructor // The name of the new employees Jane Doeid is 2001122. She makes $10.50/hour // change the object Jane's hours to 40. 1/change the object jane's pay rate to $12.00....
public class Pet { //Declaring instance variables private String name; private String species; private String parent; private String birthday; //Zero argumented constructor public Pet() { } //Parameterized constructor public Pet(String name, String species, String parent, String birthday) { this.name = name; this.species = species; this.parent = parent; this.birthday = birthday; } // getters and setters public String getName() { return name; ...
The purpose of this is to use inheritance, polymorphism, object
comparison, sorting, reading binary files, and writing binary
files. In this application you will modify a previous project. The
previous project created a hierarchy of classes modeling a company
that produces and sells parts. Some of the parts were purchased and
resold. These were modeled by the PurchasedPart class. Some of the
parts were manufactured and sold. These were modeled by the
ManufacturedPart class. In this you will add a...
please use java
do
what u can
1. Modify the Student class presented to you as follows. Each student object should also contain the scores for three tests. Provide a constructor that sets all instance values based on parameter values. Overload the constructor such that each test score is assumed to be initially zero. Provide a method called set Test Score that accepts two parameters: the test number (1 through 3) and the score. Also provide a method called get...