Skip to content

v1peridae/shop-checkout-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

DESCRIPTION

  • This is the solution to this problem.
    • The manager of a parcel delivery service needs a program to check the size and weight of parcels to determine which parcels can be accepted for delivery.

    • Write and test a program for the manager.

      • 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 – Check the size and weight of a single parcel

  • Each parcel must obey the following rules to be accepted for delivery:
    • each dimension must be no more than 80 cm
    • the sum of the three dimensions must be no more than 200 cm
    • the weight of the parcel must be between one and ten kilograms inclusive
  • Input and store the weight and dimensions for one parcel. All the dimensions and the weight must be validated on entry and an unsuitable parcel rejected.
  • Output if the parcel is accepted or rejected. If rejected, output all the reasons why the parcel was rejected.

TASK 2 – Check a customer’s consignment of parcels

  • Input and store the number of parcels in the consignment. Calculate the number of parcels accepted and the total weight of the parcels accepted. For each parcel that was rejected, output all the reasons why that parcel was rejected.
  • Output the number of parcels accepted and the total weight of parcels accepted.
  • Output the number of parcels rejected.

TASK 3 – Calculate the price for a customer’s consignment of parcels

  • Extend TASK 2 to also calculate the price for each parcel, using the following rules:
    • 1 kg to 5 kg inclusive costs $10
    • Each 100 grams over 5 kg, up to 10 kg, costs an extra $0.10
  • Your output should also include the price for each parcel accepted and the total price of the consignment

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages