Create a program that includes the following requirements: create a

In C# only :

Create a program that includes the following requirements: Create a CoffeeOrder class  

Private class members for:

order number

ingredient

constant double PRICEOFCOFFEE = 1.95

constant double price additives for cream and sugar, cream and artificial sugar, milk and sugar, milk and artificial sugar at.25, .40, .30, .40 respectively.

double order price

other class variables as needed

Public class methods:

a method to get the data for each individual CoffeeOrder object in the array of objects instantiated in Main.

the CoffeeOrder get data method will present a menu that looks like the following:

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black

2. Cream & Sugar, add 25 cents

3. Cream & Artificial Sweetener, add 40 cents

4. Milk & Sugar, add 30 cents

5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5:

Pass the counter into the get data method by reference from Main. The get data method will implement a sentinel while loop that will take an uppercase Y character entry regardless of whether y or Y is entered. In the loop, present the menu, take and convert the selection and evaluate the selection based on the ingredient additive combination entered. Based on the additive combination you will determine the total price of the cup for the current coffee object by adding the indicated additive constant to the PRICEOFCOFFEE constant. If the selection was 1 then black coffee was selected and you assign the PRICEOFCOFFEE value to the total price for a cup. The while loop will continue to take new coffee object orders until an N or n is entered. Within the selection statements you will first set the order number class variable equal to the object array index counter passed into the method from Main. If an incorrect selection is made remember to prompt the user regarding the incorrect coffee selection and present the selection menu again.

A display data method that will display the order number (make sure you display the order number + 1), the total order price, “This is what you requested to be put in your cup of coffee: “. Implement a selection structure to display the additives or black coffee as shown in the output example.

In Main:

Instantiate an array of 10 coffee order objects

set the x array index to zero and the counter that will track the number of orders taken up to 10 and the loop sentinel variable to Y

call the class method that will fill the CoffeeOrders array

a sentinel loop with a sentinel variable that will be initialized to character Y and a conditional that will continue while the sentinel is not equal to ‘N’ or ‘n’

in the while loop while the sentinel is equal to Y, instantiate the coffee order object and assign it to the current coffee order array element

call the current array element objects’ get data method, passing the counter that keeps track of the number of orders up to 10, by reference

update the counter, update the x array index

prompt the user to enter a y or Y for another cup of coffee (another coffee object) and when an n or N is entered terminate the loop.

check if the array of coffee objects index equals 10, set the sentinal value to N to exit the loop (you can only create and assign 10 coffee objects to the array of objects

Internal Documentation

The class will contain the following methods: getData and displaydata as specified above. You are creating an array to hold 10 coffee objects. Each time you take an order in Main you have to instantiate that object and assign it to the appropriate array element. Remember that you can only create 10 coffee objects. The counter you pass by reference from Main to the get data method is used by the class method to set the order number for the get data method. Analyze the suggested inputs and outputs to gain further information about how the processes are run and how incorrect inputs are handled.

Possible output might look like this:

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black
2. Cream & Sugar, add 25 cents
3. Cream & Artificial Sweetener, add 40 cents
4. Milk & Sugar, add 30 cents
5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5: 1

Do you want to order another cup of coffee? y

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black
2. Cream & Sugar, add 25 cents
3. Cream & Artificial Sweetener, add 40 cents
4. Milk & Sugar, add 30 cents
5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5: 3

Do you want to order another cup of coffee? Y

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black
2. Cream & Sugar, add 25 cents
3. Cream & Artificial Sweetener, add 40 cents
4. Milk & Sugar, add 30 cents
5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5: 8
You entered an incorrect selection, please try again.

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black
2. Cream & Sugar, add 25 cents
3. Cream & Artificial Sweetener, add 40 cents
4. Milk & Sugar, add 30 cents
5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5: 4

Do you want to order another cup of coffee? y

You are ordering a fine cup of coffee. What would you like in your coffee?

1. Black
2. Cream & Sugar, add 25 cents
3. Cream & Artificial Sweetener, add 40 cents
4. Milk & Sugar, add 30 cents
5. Milk & Artificial Sweetener, add 40 cents

Please enter your selection from 1 to 5: 5

Do you want to order another cup of coffee? N

Order Number: 1 Amount of Order: 1.95
This is what you requested to be put in your cup of coffee:
Black and nothing else

Order Number: 2 Amount of Order: 2.35
This is what you requested to be put in your cup of coffee:
Cream & Artificial Sweetener

Order Number: 3 Amount of Order: 2.25
This is what you requested to be put in your cup of coffee:
Milk & Sugar

Order Number: 4 Amount of Order: 2.35
This is what you requested to be put in your cup of coffee:
Milk & Artificial Sweetener)

Press any key to continue . . .







Calculate Your Essay Price
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 10% with the coupon code: best10