Question: Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar object

Given two integers that represent the miles to drive forward and the miles to drive in reverse as user inputs, create a SimpleCar object that performs the following operations: Drives input number of miles forward Drives input number of miles in reverse Honks the horn Reports car status The SimpleCar class is found in the file SimpleCar.java. Ex: If the input is: 100 4 the output is: beep beep Car has driven: 96 miles 446256.3126364.qx3zqy7 LAB ACTIVITY 2.34.1: LAB: Simple car 0/10 Current file: LabProgram.java Load default template... 1 import java.util.Scanner; 2 3 public class LabProgram { 4 5 6 7 8 9 public static void main(String args) { Scanner scnr = new Scanner(System.in); } /* Type your code here. */ 10 } 11
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
