Create a custom function named purchasetoarray

Assignment Help DOT NET Programming
Reference no: EM132084406

INSTRUCTIONS: Using C# - All work must be in the Main

You will be asking the user for a comma-separated list of items they wish to purchase.

a. Validate this to make sure it is not left blank.

b. Send this text string into the custom function PurchaseToArray.

Create a custom function named PurchaseToArray that will split apart the user's list text string into an array of individual items.

a. Make sure to remove any spaces before or after the item itself. b. Return this array of items to be purchased to the Main method.

Once you have the string array of items back in your Main Method create a 2nd custom function called PurchaseCosts.

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

b. Inside of this function create an array to hold the costs of these items.

i. Note the length of this ArrayList must be depended on how many items the user typed in. AKA do NOT hard-code this.

c. Loop through the items array and prompt the user for the cost of each item in the array.

i. Validate that the user is typing in a valid response.

ii. Once it is valid store this cost inside of the cost array.

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

After catching the returned cost Array, create one last custom function called SumOfCosts.

a. This array should accept the cost array as a parameter.

b. Inside of this function create a variable to hold the total sum of the items costs. c. Loop through each item in the cost Array and add their total to the sum.

d. Return this sum to the Main method.

Use the total sum variable that is return in a final output to the user that is in this format.

a. "The total cost of all of your items is $X."

i. Where X is a formatted text string that contains the cost rounded to 2 digits.

Reference no: EM132084406

Questions Cloud

What is the wacc : Equity holders require a 6% return and preferred stock holders require a 3.4% return. The current tax rate that applies to the firm is 30%. What is the WACC?
Compute the after tax cost of debt : The firms current yield to maturity on debt is 6% and the debt pays a 4% coupon. current tax rate equal 41.4%. Compute the after tax cost of debt.
Compute and output compound interest : Compute and output compound interest on $1000.00 for 10 years at interest rates of 5%, 6%, 7%, 8%, 9% and 10%
External financing over the next year : What is the formula to calculate the required external financing over the next year?
Create a custom function named purchasetoarray : Create a custom function named PurchaseToArray that will split apart the user's list text string into an array of individual items.
At what price would these bonds sell in the marketplace : At what price would these bonds sell in the marketplace? How many bonds would the firm have to issue to raise $1 million?
What is the typical size of a ntfs file record : What are the differences between a non-resident file and a resident file? How do you know if the file is resident?
Shares of common stock outstanding : If a firm has 43.30 million shares of common stock outstanding at a price of $30.55 per share. It also has 367000.00 bonds outstanding with a current price
Create a method that will accept a string : Create a method that will accept a String as an argument and then check to see if the String follows the pattern of an email address.

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Develop web services based application

Develop and test a Web services based application that meets the requirements applying SOA design principles.

  Design style elements in asp

Add drop down lists for modifying the different style elements for the label element that displays the time

  Create a shopping cart in asp

The users will use a browser to access the on-line store. The web server software for the production web server is Windows 2003 Server /IIS6.

  Inventory management system in c# application

Inventory management system in c# application

  Using .net resources to teach .net

This project will use the .NET framework to produce a set of materials to demonstrate the fundamental principles of .NET. Ideally it should demonstrate some of the principles of the framework e.g. interoperability.

  Prepare a marymount faculty site

Prepare a Marymount faculty site

  Blinky lights

Analysis proving that your code blinks the LEDs at the specified rates.

  Prepare a web application

Prepare a web application that will be used to keep track of patients registering in a hospital.

  Implementing the insurance management system

Implementing the Insurance Management System and implementation of Components as Web Services.

  Describe the characteristics of visual studio 2005

Describe the characteristics of Visual Studio 2005 Visual Studio.Net is a suite of products that includes 4 main languages. Name these languages and outline their use in industries

  What is a connectionstring

What is a ConnectionString. Give a suitable example to illustrate the various part of a ConnectionString

  Prepare a web application for internet service provider

Prepare a Web application and write the code also event planning document base. This web application allows the user to sign up for an Internet service provider for home connectivity.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd