C++ classes
$30-5000 USD
Pagado a la entrega
#1. Define a class named GroceryItem. Include private fields that hold an item's stock number, price, quantity in stock and total value. Write three public functions that each set one of the three fields, based on user keyboard input. The functions that set the stock number require the user to enter exactly 4 digits; continue to prompt the user until a valid stock number is entered. Include a private function that calculates the the GroceryItem's total value field (price times quatitity in stock) within the same function that accepts the quantity in stock input. Write a function that displays a GroceryItem's values. Finally, write a main function that declares a GroceryItem object, assigns values to its fields and uses the display functions.
#2 Define a class named CoffeeOrder. Include private integer fields tht you set to a flag value of 1 or 0 to indicte whether the coder should have any of the following cream, milk, sugar or artificial sweetener. Include a public function that takes a user's order from the keyboard and sets the values of the four fields in response to four prompts. If the user indicates both milk and cream, turn off the milk flag to allow only cream. If the user indicates both sugar and artificial sweetener, turn off the artificial sweetener flag, allowing only sugar. Include another function that displays the user's completed order. Write a main function that declares a CoffeeOrder object and calls the data entry and displays methods.
**I need these ASAP, (by Wednesday 5/26, 6pm ET), therefore, I will take these 2 as 100%, even if only about 80% done.**
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
win xp
Nº del proyecto: #3221966