Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

All of the details are there. PLEASE USE JAVA AS THE PROGRAM!!! As the Yard Manager for the AAYPSI Railroad (Ann Arbor, and Ypsilanti) you

image text in transcribed

All of the details are there. PLEASE USE JAVA AS THE PROGRAM!!!

As the Yard Manager for the AAYPSI Railroad (Ann Arbor, and Ypsilanti) you are responsible for calculating train length and total weight. You have decided to write a program to help you. To start out, you are only concerned about three types of cars: business, first class, and regular. The average lengths and weights of the car types are: You also need to calculate the number of locomotives needed to pull each train. Every locomotive is 55.0 feet long and weighs 52 tons. Each can pull 1000 tons. Note: You need to use the Math.ceil( ) method. You want your program to report the total number of rail cars (excluding engines), the number of each car type, the total weight(integer) of the train (without engines), the total number of engines(integer) required, the total weight(float) of the train (with engines), and the total length of the train (including engines). The input will consist of the number of each car type - First class, Business and Regular - in that order. You must run your program a total of three times on the following data: You should hand in your properly documented program and the output from the three runs, with your name on each program and output. If you submit program without output or output without a program, you get ZERO. Sample output with run data 235 looks like the following: This program is written by (your name goes here) Enter number of First class cars: 2 Enter number of Business cars: 3 Enter number of Regular cars: 5 The train is 10 cars long and consists of: 2 first class cars 3 business cars 5 regular cars explanation The total weight of the cars is 651 tons. (253+365+570) The number of engines required is 1 . (weight less than 1000, so you just need 1) The weight of the entire train is 703 tons. (651 from before +521 of the locomotive) The total train is 757.50 feet long. (245.0+370.0+580.5+55.01)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions

Question

5. How do instructional objectives help learning to occur?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago