Course Hero Logo

Assessment 1.doc - Task1 Explain the use of the word...

Course Hero uses AI to attempt to automatically extract content from documents to surface to you and others so you can study better, e.g., in search results, to enrich docs, and more. This preview shows page 1 - 4 out of 13 pages.

Task1Explain the use of the word ‘dynamic’ in the following code and define the output.
A method can have parameters of the dynamic type
Task2Explain some reasons why C# is a preferred programming language to develop medium-sizeapplications.
Task 3The first step in writing instructions to carry out a task is to determine what the output should be –that is, what the task should produce. The second step is to identify the data, or input, necessary toobtain the output. The last step is to determine how to process the input to obtain the desiredoutput. The general processof writing a program is to analyse the problem, design and plan the solution, coding which is totranslate the algorithm into a programming language and finally testing and debugging. You usealgorithms every day to make decisions or perform tasks. For example, consider a 30% discountsale at a supermarket.a. Write a C# program that calculates and displays the price of an item after discount according tothe price displayed to the consumer.b. Show the discount algorithm in the form of a flowchartc. Write the discount algorithm in the form of pseudocodenamespace{public partial classWebForm1: System.Web.UI.Page{protected voidPage_Load(objectsender, EventArgs e)}protected voidButton1_Click(objectsender, EventArgs e){Double num1 = Convert.ToDouble(TextBox1.Text);doubledis = 30 / 100;TextBox2.Text = Convert.ToString(dis);doublediscount = num1 * dis;return(dicount);}
startPrice inputDiscountrateinputDiscount=price*discountrate/100Displaypricebeforediscount= price inputDisplaydiscountrate=discountrate+%%Display discountDisplaypriceafterdiscountend

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 13 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
One
Professor
N/A
Tags
Rapid application development, Software development methodology

Newly uploaded documents

Show More

Newly uploaded documents

Show More

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture