Question: 1 . Write a program to define the Course class that has a name, numberOfSeats, department and numberOfCourses ( which will keep track of how
Write a program to define the Course class that has a name, numberOfSeats, department and numberOfCourses which will keep track of how many objects have been created of this class and allow users to get that value The variable numberOfCourses will be shared by all instances of class, so declare this variable as static.
Have a method to set objects and another method to getNumberOfCourses. Since this method will return a value that is shared by all classes which means it is not tied to a specific object implement this method as static.
Write a test program to do the following:
Create object CCSCS
Invoke getNumberOfCourses
Create object CCSCS
Invoke getNumberOfCourses
Create object CCSCS
Create object CCSCS
Invoke getNumberOfCourses
Implement the class TestPointD Write a test program to read the coordinates of points P P and P and prints the distance between P & P and then prints the distance between P & P Label your answers. Use Java Application Programming Interface API has a PointD class in the javafx.geometry package for representing a point in a twodimensional plane.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
