JavaFX代写|CS213 Assignment 3 Photos



  1. Your code should be well commented:
    • Add your name and email address at the beginning of each .java
    • Write comments within your code when
      • You must use Javadoc comments for your classes and
      • You must write each method’s running time in your Javadoc comments for that
  2. Before submitting your assignment, you must zip all your
    • The ZIP file must have the naming convention
  3. Submit your assignment via LATTE using the assignment submission

Goals of Assignment:

Ensure you are comfortable with object-oriented design.

Your Task:

Structure an Ice cream truck. Your ice cream truck must have some start up cash (more than $100 to purchase the three flavors every truck needs: Vanilla, Chocolate, and Strawberry). Ask the user to input how much money they wish to fund, then make sure the truck purchases those three flavors for the following prices.

Flavor Amount (in scoops) Cost per scoop Wholesale cost per scoop
Vanilla 24 1.00 0.50
Chocolate 32 1.50 1.00
Strawberry 16 1.50 1.00

Your ice cream truck needs to be able to accept other flavors as well, while taking into account the amount, cost per scoop and wholesale cost per scoop. The cost per scoop is what the customer pays for a scoop of ice cream, the wholesale cost per scoop is the price the ice cream truck pays to its ice cream dealer.

Be sure to keep track of the amount of ice cream left in the truck, the initial amount of ice cream bought, and the amount of ice cream sold. These will be used later when checking the cashbox. You must make sure your employees are not stealing from you.

Make sure there is a way to enter new employees that have permissions to access the register and/or drive the truck.

Once you have an employee ready to drive the truck and an employee who can operate the register (or one that can do both), start the ice cream truck on its route. Look for customers, and take their orders.

After finishing the route, check the cashbox. You calculate these in the following ways:

Starting cash Does not change

The amount of funding initially invested

Ice cream bought The cost that the truck paid for ice cream (wholesale).
Ice cream sold The total money taken in from customers
Expected sales from missing inventory Check all the ice cream flavors in the truck, seeing how many scoops are missing (have been sold — or eaten by your employees!). Based on the cost per scoop, find the total of how much money we expect to see in Ice Cream Sold
Cash in truck The remaining cash in the truck
Profit Cash in the box less the expenses from buying ice cream whole sale less the starting cash. For few sales, this number will be negative.

Expected sales from missing inventory and Ice cream sold should match. If not, you have debugging to do (or employees to fire).

Make sure your code has a file named This is where the interactions between user and computer will take place. You should have other files for classes that you use to implement the ice cream truck.

There is no sample code provided for this assignment. We want to see how you structure your code to meet the challenges presented. Feel free to be creative as long as it makes sense.

See the sample console interaction below for an idea of what we expect.