Skip to content

v1peridae/school-payment-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Description

  • A teacher is planning a school trip to a theme park at the end of term. You have been asked to write a program to work out the cost per student, to record those who are going and whether they have paid.
  • The maximum number of students who can go on the trip is 45.
  • Write and test a program for the teacher.
    • Your program must include appropriate prompts for the entry of data.
    • Error messages and other output need to be set out clearly.
    • All variables, constants and other identifiers must have meaningful names.
  • You will need to complete these three tasks. Each task must be fully tested.

TASK 1 – Work out the cost.

  • The cost of the trip for each student is a share of the cost of a coach plus the cost of entry to the theme park. The total cost of the coach will be $550. The entry cost to the park is $30 for each student. The theme park gives one free ticket for every ten that are bought, which must be taken into consideration.
  • Set up a program that:
    • stores the cost of the coach
    • stores the cost of an entry ticket
    • inputs the estimated number of students taking part, this must be validated on entry and an unsuitable entry rejected.
    • calculates and outputs the recommended cost per student to ensure the trip does not make a loss.

TASK 2 – Record the students who are going and whether they have paid.

  • Input and store the names of the students who have asked to go on the trip up to the maximum number allowed. Input and store whether each student has paid. Enable printouts to be produced to show students who have not paid and those who have paid.

TASK 3 – Work out final costs.

  • Not all students will end up going on the trip, for example they might not have paid. Modify the program so that it gives overall totals for the costs charged and the amount of money collected. Output whether the school trip has made a profit or loss, or has broken even, and the amount of the final balance.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages