Course Hero Logo

RAD - A 1.pdf - Explain the use of the word ‘dynamic’ in...

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 11 pages.

Task 1Explain the use of the word ‘dynamic’ in the following code and define the output.
Task 2Explain some reasons why C# is a preferred programming language to develop medium-size applications.
Task 3The first step in writing instructions to carry out a task is to determine what the outputshould be – that is, what the task should produce. The second step is to identify the data,or input, necessary to obtain the output. The last step is to determine how to process theinput to obtain the desired output. The general processof writing a program is to analyse the problem, design and plan the solution, codingwhich is to translate the algorithm into a programming language and finally testing anddebugging. You use algorithms every day to make decisions or perform tasks. Forexample, consider a 30% discount sale at a supermarket.Write a C# program that calculates and displays the price of an item after discountaccording to the price displayed to the consumer.// C# Program to find the// Discount Percentageusing System;class Discount{static float discountPercentage(float p, float d){float percentage = p;float item_price = d;// Calculating discount percentagefloat priceAfterDiscount = item_price - (item_price * percentage /100);return priceAfterDiscount;}// Driver codestatic public void Main (){Console.WriteLine("Enter the price of the item:");float p = Console.ReadLine();Console.WriteLine("Enter the percentage of the discount:");float d = Console.ReadLine();Console.WriteLine(discountPercentage(p, d));}
}Show the discount algorithm in the form of a flowchartWrite the discount algorithm in the form of pseudocodeInput: Price of the item, discount percentagePriceAfterDiscount = Price of the item - (Price of the item * discount percentage /100)Output: PriceAfterDiscountPrice of theitemDiscountpercentagePrice after discount: Price of the item - (Priceof the item * discount percentage /100)Price afterdiscount

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 11 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
N/A
Professor
Mamun khan
Tags
Rapid application development, Philip Crosby

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