Skip to content

In Competency Exercises, you demonstrate your skill and ability to use the programming principles you've learned in the current and previous modules. You must complete this assignment by yourself, much like a module exam. You can ask instructors for clarification about the project -- you can not ask instructors or other students for help with lo…

License

Notifications You must be signed in to change notification settings

bell-kevin/vendingMachineInventory

Repository files navigation

vendingMachineInventory

In Competency Exercises, you demonstrate your skill and ability to use the programming principles you've learned in the current and previous modules. You must complete this assignment by yourself, much like a module exam. You can ask instructors for clarification about the project -- you can not ask instructors or other students for help with logic or coding. If you are struggling with the project, you can look at previous assignments where you did similar work, and you can review the pertinent sections in the book. These are the skills you practiced in this module and will now demonstrate: Classes Instantiating objects Constructors Class methods Module 3 Competency Exercise: Vending Machine Inventory In this exercise, you work with the inventory for the beverage vending machine in the Barlow building. Create a class for the inventory in the vending machine. Each inventory item has a name, a price, and a quantity. The class needs a constructor to instantiate each inventory item, a method to display the item with its price and quantity, and a method for receiving new stock which will add to the quantity for that inventory item. Make sure that all money values display correctly, with a dollar sign and 2 decimal places. In the driver class, instantiate 3 inventory items with a price and quantity, then display that starting inventory for all items. For each of those items, ask the user how many are being delivered, and display the value of that quantity of that item, the cost for that delivery. After deliveries for all 3 items, display the inventory for all items. You may choose the items, price, and quantity. If you prefer, you can work with the vending machine for candy and snacks instead of beverages. Run your project and take a screenshot. Remember the style rules that apply to all projects throughout this course. Even if not specifically mentioned in the assignments, you are responsible for the following: Use descriptive names for all variables Add comments describing the use or meaning of variables Do NOT include literal values in any calculations, always use variables Always include a header in the output with a descriptive title and your name If asking for input, make sure the user types on the same line as the question Where sample sessions are provided, output from your project must match it Note that you must use correct formatting in the code -- appropriate indentation is most important. You can use Shift-Alt-F to have NetBeans automatically format the code correctly. If the formatting is incorrect, it will be returned to you for changes with a grade of zero. Submission: specified screenshots and root folder for the project

== We're Using GitHub Under Protest ==

This project is currently hosted on GitHub. This is not ideal; GitHub is a proprietary, trade-secret system that is not Free and Open Souce Software (FOSS). We are deeply concerned about using a proprietary system like GitHub to develop our FOSS project. We have an open {bug ticket, mailing list thread, etc.} where the project contributors are actively discussing how we can move away from GitHub in the long term. We urge you to read about the Give up GitHub campaign from the Software Freedom Conservancy to understand some of the reasons why GitHub is not a good place to host FOSS projects.

If you are a contributor who personally has already quit using GitHub, please check this resource for how to send us contributions without using GitHub directly.

Any use of this project's code by GitHub Copilot, past or present, is done without our permission. We do not consent to GitHub's use of this project's code in Copilot.

Logo of the GiveUpGitHub campaign

About

In Competency Exercises, you demonstrate your skill and ability to use the programming principles you've learned in the current and previous modules. You must complete this assignment by yourself, much like a module exam. You can ask instructors for clarification about the project -- you can not ask instructors or other students for help with lo…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages