Unformatted text preview: open seats (ie no one’s sitting in them) on the bus. Assume that each passenger occupies one seat. 2. Write a Java application (another class) that has a main method which • declares and creates a Bus object with 40 seats • adds 12 passengers to that Bus object • prints out the number oF remaining empty seats via the getNumEmptySeats method call...
View Full Document
- Spring '07
- Object-Oriented Programming, Subroutine, integer parameter seats, getNumEmptySeats, addPassengers, instance fields numPassengers