American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

6 PM – Intro To Java

August 19, 2021 @ 6:00 pm - 7:00 pm

Homework
  1. Add code inside getVehicle(int numOfSeat)
  2. Use for loop to go through each Vehicles in the list.
  3. Print the vehicle whose vehicle.numOfSeat is >= numOfSeat
  4. Example 1
    Please select a driver below: 
    Nicholas - 1.5 miles/minute
    Brandon - 2.0 miles/minute
    Amber - 1.0 miles/minute
    Gamas - 2.0 miles/minute
    Dylan - 3.0 miles/minute
    Enter the name of the driver or 'exit' to quit: nicholas
    
    Please enter the number of passenger: 6
    Please select your vehicle
    BMW - 7 seats
    Enter your selection: bmw
  5. Example 2. In this example since the user enter 2 for number of passenger, there are more choices on the vehicle:
    Please select a driver below: 
    Nicholas - 1.5 miles/minute
    Brandon - 2.0 miles/minute
    Amber - 1.0 miles/minute
    Gamas - 2.0 miles/minute
    Dylan - 3.0 miles/minute
    Enter the name of the driver or 'exit' to quit: brandon
    
    Please enter the number of passenger: 2
    Please select your vehicle
    BMW - 7 seats
    Camry - 5 seats
    Smart Car - 2 seats
    Enter your selection: camry

Details

Date:
August 19, 2021
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights