Answer to Question #233871 in Programming & Computer Science for Selma Shigwedha

Question #233871
Create a program that takes in the following CMD arguments: A car’s plate number (registration
number), arrival time and departure time plus the cost for staying in the parking lot. Your task then
is to take these given information to print a simple receipt as indicated below (Don’t worry about the
calculations for now.)
Sample run 1:
Java lab01_task04 N88W 8h30 9h45 6.25
Output:
Vehicle Details
N88W
++++++++++++++++++++++
Arrival 8h30
Departure 9h45
++++++++++++++++++++++
Total Cost: N$ 6.25
++++++++++++++++++++++
1
Expert's answer
2021-09-06T13:17:23-0400




public class lab01_task04  {
	public static void main(String[] args) {
		
		System.out.println("Vehicle Details");
		System.out.println(args[0]);
		System.out.println("++++++++++++++++++++++");
		System.out.println("Arrival "+args[1]);
		System.out.println("Departure "+args[2]);
		System.out.println("++++++++++++++++++++++");
		System.out.println("Total Cost: N$ "+args[3]);
		System.out.println("++++++++++++++++++++++");
		
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS