Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Begin an empty console application. 2. Design a class named dailyMenu that has the following attributes. Please take care to use the proper level of

Begin an empty console application. 2. Design a class named dailyMenu that has the following attributes. Please take care to use the proper level of visibility: string day (name of day of the week) int date (date) string entre double price int calories 3. Write properties for every instance field. 4. Create a static int variable that you will use to assign the date; initialize the value to 1. 5. Create a static array of strings that hold the days of the week (M-F). 6. Create a static array of strings that hold 12 random entre items. You may initialize this array with items of your choosing. 7. Create a static parallel array of doubles that contain the price of each entre. You may initialize this array with values of your choosing. 8. Create a static parallel array of ints that contains the caloric value of each entre. You may initialize this array with values of your choosing. -------------- 9. Write a parameter-less constructor that uses the following methods to create an array instance of dailyMenu. Note: when you have finished 10, 11, and 12, youll need to call them from the constructor. 10. Write a method that assigns the name of the day of the week to the instance. 11. Write a method to assign the current value in the static date variable to instances date field. Increment the date. Using a conditional expression, handle incrementation to skip the weekend dates! 12. Write a method to that will choose a random number and then populate the instances entre, price, and calorie fields from those arrays. Take care that your random number generator will not go out of bounds of these arrays! ---------------------------------------- 13. In Main, create a 2D array of 20 days that will hold objects of type day. Your array should contain 4 rows for the weeks and 5 days for each week. 14. Write a loop to populate the 2D array with a dailyMenu object for each day. Due to the automation youve created in your class, you should require NO input from your user to do this! Take a look at the Preston tutorial that is shown in the course calendar labeled Collections of Instances for help with this part. NOTE: Please use a 2D Array, NOT a List. 15. Output the array to the console, printing the entire array, to look something like this. Note: your printout will enable you to verify the functions you create below. Monday 1 Chicken Nuggets $3.99 280 Calories Wednesday 10 Pizza $5.99 480 Calories 16. Write a function that accepts the 2D array as an argument. Your function should allow your user to enter an entre to search for. Provide your user with a printout of any and all days on which this entre will be served. 17. Call function you just wrote from main. 18. Write a function that accepts the 2D array as an argument. Print out the item with the highest caloric value and the lowest caloric value. 19. Call the function you just wrote from main. 20. Write one last function that accepts the 2D array as an argument. Ask the user how much money he has budgeted for lunch per day. Print out a list of items that he can afford to purchase and what days (day and date) those items are available. 21. Call the function that you just wrote from main. In CSharp please explain steps if can.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

=+ f. instituting laws against driving while intoxicated

Answered: 1 week ago