Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A truck needs to transport bananas, pears, and apples from town A to town D. Along the way, the truck needs to stop in
A truck needs to transport bananas, pears, and apples from town A to town D. Along the way, the truck needs to stop in towns B and C respectively do to pickups. These are as follows: Town B Bananas -> pickup 15 Pears -> pickup 5 Apples -> pickup 7 Town C -- Bananas -> pick up 80% of the current load Pears -> pick up 25% of the current load Apples -> pick up 12 Create a Java program called Truck Fruit TransportXYZ (replace XYZ by your first and last names). Prompt the user to enter the initial number of each fruits at departure in town A. Display the number of fruits on each category after towns B, C and D. After town D, find out the categories that successfully pass the check points based on the following criteria: Bananas -> Between 40 and 60 (inclusive) Pears -> More than 15 Apples -> More than 20 and less than 50 You are REQUIRED to use augmented operators. Any submission without augmented operators will receive no credit. Please submit your Java file. Sample runs are attached. Enter initial number of bananas, pears and apples at town A: 10 10 10 |---- Town A --- Bananas: 10, pears: 10, apples: 10 ---- Town B ---- Bananas: 25, pears: 15, apples: 17 --- Town C Bananas: 45, pears: 18, apples: 29 Town D --- Bananas: 45, pears: 18, apples: 29 --- Checkpoints Bananas pass. Between 40 and 60 (inclusive) Pears pass. More than 15 Apples pass. More than 20 and less than 50
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