Program 2: Celestial Coffee

Due: 03/09

The purpose of this exercise is to create a program takes in the user’s name and address and coffee order and display the total order with the appropriate sales tax.

Use textboxes for the user to enter the number of pounds of regular and decaf coffee respectively. Regular coffee is $4 per pound. Decaf coffee is $5.50 per pound.

In this exercise, you will:

  • Create an algorithm
  • Work with adding Controls to a XOJO Form
  • Declare and Assign values to Variables
  • Use a Constant Variable
  • Cast Inputs to appropriate data types
  • Use arithmetic operations

Instructions:

  1. Before your Code: Create the algorithm
  2. Identify inputs (Name, Address, City, State, Zip, Pounds of regular coffee ordered, Pounds of Decaf coffee ordered)
  3. Identify the steps in your process
  4. Identify outputs (Name, Address, Total Pounds of Coffee, Subtotal, Tax & Total Price)
  5. Create a new XOJO Desktop Application named ‘CelestialCoffee’ and save it your local course folder
  6. Design your form by adding the necessary controls. Play with the control properties to change colors/backgrounds.
  7. Write the code to calculate the total pounds of coffee ordered and the total price plus sales tax.
  8. Add Clear and Exit Buttons
  9. Output the user’s information and total order to the form (like a receipt).
  10. For an added challenge – spruce up your form by adding a relevant image
  11. Save All, Compile and Run Your Form
  12. Upload your completed files to GitHub

Accept the Assignment