Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the following c++ program along with output. 4:31 PM ...0.1KB/S B .Ill| 4Gur LTE 28 Lab Assignment... Q . . . Assignment #3 Instructions

Write the following c++ program along with output.

image text in transcribedimage text in transcribed
4:31 PM ...0.1KB/S B .Ill| 4Gur LTE 28 Lab Assignment... Q . . . Assignment #3 Instructions This assignment and all other assignments in this course must be done individually. You can get help ONLY from your instructor. After completing your program, make sure you test it to work on different inputs. You should make sure you submit your project to Moodle before the due date and time. DO NOT email me your assignment. If you email me your assignment, I will ignore it and you will receive ZERO. Your program should be saved in a folder named using your full name and student number. For example, if your full name is John William and your student number is 1234567, then your project name MUST be John William_1234567_Assignment2. You should use ZIP compression NOT RAR. Objectives: Determine input and output requirements Develop algorithms using repetition structures to solve a problem. Develop a program using input and output files Implement pseudo-code using a programming language Test, debug, and document programs Specifications: A travel agent asks you to write a program that issues receipts for passenger tickets. The input to your program is the full name of the passenger (string), the ticket price (float) and the number of bags (integer). The program should find the amount of the airport tax which is 7.5% of the ticket price and the net price to be paid by the customer which is the summation of the ticket price and airport tax. If customer bags exceed the allowance allowed which is two bags, ticket price will be increased by $100 for each additional checked bag. Assume each input is stored on a single line in a file called ticket.txt. Your program should read the input from this file and store the output in a file called fare.txt. The ticket price, airport tax, and net price should be set to the precision of three decimal places. The output, and its format, is set according to the following sample input/output.ticket.txt fare.txt John Smith 1520.5 3 Passenger Name ------- John Smith Tom McDonald 2100.78 2 Bags ---- Ticket Price - ---- -. $1520.500 Airport Tax ---- -$114.038 Net Price - -$1734.538 Passenger Name ---- -- Tom McDonald Bags 2 Note that this is just a sample Ticket Price $2100.780 ticket.txt may include information Airport Tax - -$157.559 Net Price --- $ 2258.339 about more than two passengers Grading Criteria Your program should be satisfied problem specification completely and correctly. (65%) Included well-formatted comments. (10%) free of syntax, run-time and logic errors, i.e. program runs correctly. (25% )

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

1. State how schools help in socialization?

Answered: 1 week ago

Question

What are the major medium of communication ?

Answered: 1 week ago

Question

Family basic steps to socialization write a short note ?

Answered: 1 week ago