Question: 4. Consider the following Java class named Staff. import java.util.ArrayList; public class Staff { private String username; private String pwd; private String id; private String

4. Consider the following Java class named Staff. import java.util.ArrayList; public class Staff { private String username; private String pwd; private String id; private String name; private ArrayList carList; public Staff(String u, String p, String i, String n) { username = u; pwd = p; id = i; name = n; carList = new ArrayList(); } public String getUserName() { return username; } public String getPassword() { return pwd; } public String getId() { return id; } public String getName() { return name; } public ArrayList getAllRegisteredCars() { return carList; } public boolean isRegisteredCar(String plateNum) { for (Car element: carList) { if (element.getPlateNum().equals(plateNum)) return true; } return false; } public void registerCar(Car car) { carList.add(car); } public void unregisterCar(String plateNum) { for (int i=0; i

} }

4. Consider the following Java class named Staff. import java.util.ArrayList; public class

Draw the object sequence diagram that represents the execution of the following statement. Staff staff = new Staff ("jack", "jack123", "E007", "Jack Brown"); staff.unregisterCar ("MBL8973")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!