Problem : Create program that will calculate the cost and time to complete delev
ID: 671862 • Letter: P
Question
Problem: Create program that will calculate the cost and time to complete deleveries between planets.
Details:
- Delivery service has 3 different shipping services for customers
- Each service has an associated cost per mile and will be shipped on a droid controlled shipping vessel
- Each shipping vessel has a specific speed used for travel
- Rate and speeds of the 3 services:
- All input will be file based
- Each line in the file will represent a shipment from one planet to another planet
- The program will calculate the shipping cost and travel time per shipment
- For each planet, keep track of the total cost of shipments leaving that planet and the total time spent for items in transit from the planet
- Total cost is based on the weight at the destination planet
- Program must use character and/or C-string functions to validate data (use of string functions aren't permitted in this program)
Planetary Information
Input: All input will be read from a file name shipment.txt. Each shipment will be represented on a seperate line. Each shipment will have the same format:
<service code><space><shipping planet code><space><delivery planet code><space><shipment weight>
Each code is represented by a character as seen earlier in doc. The shipment weight is listed in Earth pounds.
Output: After input file is processed, display a report in the console window. Report shoud be formatted into 3 columns: planet name, total shipping cost from planet & total time it took for deliveries from planet (in hours).
Service Code Cost Speed 1st Class F $0.25/lb 45000mi/hr Priority P $0.75/lb 95000mi/hr Express E $1.50/lb 175000mi/hrExplanation / Answer
Please provide proper codes for each planet to Sun with correct Codes.
Then i will annswer your question
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.