first commit
This commit is contained in:
commit
8c81ee28b7
3106 files changed
+474415
No files matched your search
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Class Car - nonsense class for debugger demo
|
||||
*
|
||||
* @author Michael Kolling
|
||||
* @version 13 August 1999
|
||||
*/
|
||||
public class Car
|
||||
{
|
||||
private int numberOfFrontSeats;
|
||||
private int numberOfBackSeats;
|
||||
|
||||
/**
|
||||
* Create a car with seat numbers
|
||||
*/
|
||||
public Car(int frontSeats, int backSeats)
|
||||
{
|
||||
numberOfFrontSeats = frontSeats;
|
||||
numberOfBackSeats = backSeats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of seats in the car.
|
||||
*/
|
||||
public int seats()
|
||||
{
|
||||
int totalSeats;
|
||||
|
||||
totalSeats = numberOfFrontSeats;
|
||||
totalSeats += numberOfBackSeats;
|
||||
|
||||
return totalSeats;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user