jcgeneration / JavaControlFlow

Control Flow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Control Flow



Part 1: Commission Calculator

  1. Using Eclipse, write a Java app that takes numerical input from a user
  2. The app should calculate commission based on this chart used by the retail store.
Sales Range Commission
above 10000$ 30%
5001 - 9999$ 20%
1001 - 4999$ 10%
below 1000$ N/A
  1. Example: if a user enters 7677 as their sales figure, it should calculate commission at 20%.

Part 2: Movie Discounts

  1. A movie cinema does price discounting depending on a customer's age.
  2. The app prompts a user to enter their age on the Eclipse console after which it checks whether the user meets the discount conditions.
Age range Ticket Price
Normal ticket 7 Euros
Below 5 60% Discount
Over 60 55% Discount
  1. Write the app so that the conditions above are met and the correct ticket price is returned.

Extra features

If done with the first part of the exercise with time to spare add the following feature.

  1. Have the app prompt normal ticket buyers for the number of tickets they wish to buy.
  2. For every two or more tickets sold, give a 30% discount.

About

Control Flow

License:MIT License


Languages

Language:Java 100.0%