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 the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Australia Assessments
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Federal government
Good content.
Customer 462687, April 4th, 2022
English 101
Looks really good, thanks
Customer 454425, June 16th, 2020
SEO
The work is well-written, pretty much flawless.
Customer 463869, May 8th, 2023
Other
This discussion paper is satisfactory and I will accept it "as is." There are changes that need to be made, but I will make them myself rather than requesting revisions and waiting hours for the completed work.
Customer 452455, February 22nd, 2023
SEO
you captured my imagination. good copy writing skills
Customer 452441, June 17th, 2022
Natural Sciences
Good discussion and instruction abidance.
Customer 458115, April 7th, 2022
History
Good work.
Customer 462717, May 15th, 2022
Public Administration
N/a
Customer 453751, June 28th, 2020
Technology
Visuals could be enhanced.
Customer 454483, April 13th, 2022
Web Design
Well done
Customer 452441, April 15th, 2022
Medicine
Very thorough and well written. Exceeded time frame slightly, but overall satisfied with the result.
Customer 454007, February 8th, 2020
Art (Fine arts, Performing arts)
Good job.
Customer 462997, May 18th, 2022
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat