Question
what is pseudocode and flowchart for this program? import java.io.*; Import java.util.*; class Carrent { int count = 0; static int CarType, days,licno; static double
what is pseudocode and flowchart for this program?
import java.io.*; Import java.util.*; class Carrent { int count = 0; static int CarType, days,licno; static double DailyFee, Total; static String name; public void Reservations() { System.out.println("CAR RESERVATION"); System.out print("What vehical would you like to rent? "); System.out.println("Enter 1 for an economy car "); System.out.println("Enter 2 for a sedan car *); System.out println("Enter 3 for an SUV"); } public void PlaceOrder() { Scanner keyboard = new Scanner(System.in); CarType = Keyboard.nextInt(); if (CarType == 1) DailyFee=(int)3000; else if(CarType ==2) DailyFee=(int)4000; else if(CarType == 3) DailyFee=(int)4300; System out print("Please enter the number of days rented.: "); days = keyboard.nextInt(); Total = DailyFee*days; System.out printf("The total amount is" +Total); System.out.println(" YOUR CAR IS RESERVED"); } public void Driver() { Scanner sc = new Scanner(System.in); System.out.printlb(" ENTER DRIVER DETAILS"); System.out.println("NAME:"); name = sc.nextLine(); System. out.println("ENTER LICIENCE NUMBER"); licno = sc.nextInt(); System.out.println("dear "+name+"of licence number "+licno+" your car is booked have a safe drive"); } public static void main(String args[]) { Carrent c= new Carrent(); c. Reservations(); c.PlaceOrder(); c. Driver(); } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started