Skip to content

Instantly share code, notes, and snippets.

@Melbourneandrew
Created September 20, 2023 16:05
Show Gist options
  • Save Melbourneandrew/48d612ca7d3860d5903608b187ee0b78 to your computer and use it in GitHub Desktop.
Save Melbourneandrew/48d612ca7d3860d5903608b187ee0b78 to your computer and use it in GitHub Desktop.
Response to ACM TIP application question
import java.util.ArrayList;
import java.util.List;
class Car{
public Car(){}
}
public class Dealership {
List<Car> inventory;
public Dealership(){
inventory = new ArrayList<Car>();
}
public void buyCar(Car car){
inventory.add(car);
}
public void sellCar(Car car){
inventory.remove(car);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment