1. Congratulations! You're the proud CEO of a java-based car production company. You're just starting up your business,
Posted: Tue Jul 12, 2022 8:16 am
company. You're just starting up your business, however, so you have a huge collection of random hubcaps that you've found over the past few years that you want to use. You have a class called "CarChassis", which has one instance variable `private Tire[] tires' which is an array of Tires that should store FOUR tires. The Tire class has one instance variable, `private Hubcap hub'. Finally, the Hubcap class has one instance variable, `private String model'. Write three constructors; one for CarChassis, Tire, and Hubcap. The CarChassis constructor takes an Array of Strings (it will be of size 4), with each string representing a hubcap model (for example, ["rusty hubcap", "orange hubcap", "tinted hubcap", "golden hubcap"]). When creating your array of Tires within this constructor, each of the Tire objects should be passed one of the hubcaps from the Array of Strings. The Tire constructor will take a String 'model', representing the model of hubcap on that tire. The Hubcap constructor also takes a String 'model' and sets its instance variable 'model' to that parameter. Copy/Paste, then fill in the code for the following constructors: public CarChassis (String [] hubcaps) { } public Tire(String model) { } public Hubcap(String model) {
1. Congratulations! You're the proud CEO of a java-based car production