first commit

This commit is contained in:
Boris
2024-01-15 20:14:10 +00:00
commit 8c81ee28b7
3106 changed files with 474415 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
/**
* Set up a passenger-source and taxi-company, to illustrate
* the scenario of requesting a pickup.
*
* @author David J. Barnes and Michael Kölling
* @version 2016.02.29
*/
public class Demo
{
private PassengerSource source;
private TaxiCompany company;
/**
* Create some sample objects for the demo.
*/
public Demo()
{
company = new TaxiCompany();
source = new PassengerSource(company);
}
/**
* Request a pickup for a new passenger.
* The request will fail in this version.
*/
public void pickupTest()
{
if(source.requestPickup()) {
System.out.println("Pickup request succeeded.");
}
else {
System.out.println("Pickup request failed.");
}
}
}