1. Engineering
  2. Computer Science
  3. create a java project...

Question: create a java project...

Question details

Create a Java project

Part-1 Add a class called Comp3110. The class should have 3 instance variables: numOfStudents (an integer), instructor (a string), and passingScore (a double). It should have 2 constructors. A default constructor that sets numOfStudents to 30, instructor to Dr Melvin, and passing Score to 70, and another constructor that takes three parameters to initialize the three instance variables. You should make all the instance variables private and provide appropriate set and get methods. You should also have a method called display that shows: Number of Students: numOfStudents Instructor: instructor Passing Score: passingScore Part-2 In the main method, creates two instances of Comp3110 class using the default and 3 parameter constructors. Each instance should make a call to its display method.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution