Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C# You will be prompting the user for a text string a list of bills they have every month. a. This should be a

In C# You will be prompting the user for a text string a list of bills they have every month.

a. This should be a comma separated list , bill1, bill2, bill3

b. Validate that this text string is not left blank.

3. Create a custom function called CreateBillArray

a. This function should accept the string variable that holds the bills.

b. Inside of the function, split the text string of the bills into a string array with each individual bill in its own array element.

c. Make sure to remove any spaces before or after the bill itself.

d. Return this string array back to the Main.

4. Create a custom function called BillCosts.

a. This function should accept the string array of bills.

b. Inside of this function create an array to hold the cost of each bill.

c. Loop through the bill string array and prompt the user for the cost of each individual bill. i. Make sure to validate this user prompt.

d. After you get each cost, Return this array to the Main.

5. Create a 3rd custom function called TotalOfBills.

a. This function should accept the decimal array of the bill costs as a parameter.

b. Inside of the function, create a variable to hold the total sum of all of the bills.

c. Create a loop and cycle through the array of costs and add them all up.

d. Return this monthly total for the bills back to the Main.

6. Now you will ask the user for one more piece of information, making sure you validate and convert it to the correct data type.

a. Prompt the user for the number of months that they would like to see.

7. Using the amount of months request and the average cost per month, calculate the amount they will owe in bills.

8. The final output to the user should be done in the Main and follow this format.

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions