Task #1 Coding the UML Diagrams Following the UML diagrams, create the classes a
ID: 440265 • Letter: T
Question
Task #1 Coding the UML Diagrams
Following the UML diagrams, create the classes as indicated. Compile and debug.
Task #2 Testing
Copy the files ParkingTicketSimulator.java and ParkingTicketSimulator2.java from Learn@UW-Stout. Compile and run ParkingTicketSimulator.java. The car in this program was parked for longer than the time purchased on the parking meter. You should get the following output:
Car Data:
Make: Volkswagen
Model: 1972
Color: Red
License Number: 147RHZM
Minutes Parked: 125
Officer Data:
Name: Joe Friday
BadgeNumber: 4788
Minutes Illegally Parked: 65
Fine: $35.00
Compile and run ParkingTicketSimulator2.java. The car in this program was legally parked. You should get the following output.
No crimes committed!
Task #3 Documentation
Write javadoc comments above each class heading and method heading. Create the HTML documentation. Be sure to use @param and @return so that all details show up in the documentation.
Code Listing ParkingTicketSimulator.java
/**
ParkingTicketSimulator program
Parking Ticket Simulator
*/
public class ParkingTicketSimulator
{
public static void main(String[] args)
{
// Create a ParkedCar object.
// The car was parked for 125 minutes.
ParkedCar car = new ParkedCar("Volkswagen", "1972", "Red",
"147RHZM", 125);
// Create a ParkingMeter object. 60 minutes were purchased.
ParkingMeter meter = new ParkingMeter(60);
// Create a PoliceOfficer object.
PoliceOfficer officer = new PoliceOfficer("Joe Friday",
"4788");
// Let the officer patrol.
ParkingTicket ticket = officer.patrol(car, meter);
// Did the officer issue a ticket?
if (ticket != null)
System.out.println(ticket);
else
System.out.println("No crimes committed!");
}
}
Code Listing ParkingTicketSimulator2.java
/**
ParkingTicketSimulator program
Parking Ticket Simulator
*/
public class ParkingTicketSimulator2
{
public static void main(String[] args)
{
// Create a ParkedCar object.
// The car was parked for 60 minutes.
ParkedCar car = new ParkedCar("Volkswagen", "1972", "Red",
"147RHZM", 60);
// Create a ParkingMeter object. 60 minutes were purchased.
ParkingMeter meter = new ParkingMeter(60);
// Create a PoliceOfficer object.
PoliceOfficer officer = new PoliceOfficer("Joe Friday",
"4788");
// Let the officer patrol.
ParkingTicket ticket = officer.patrol(car, meter);
// Did the officer issue a ticket?
if (ticket != null)
System.out.println(ticket);
else
System.out.println("No crimes committed!");
}
}
Explanation / Answer
u will find the answer in the below site. it will be helpful please rate me www.civerson.com/C118/pages/40.html
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.