
Create the following form using C#
Create a form ,name this new form: Loops
Name all your objects clearly as in :
i. txtLaptopCurrentPrice
ii. txtDesiredPrice
iii. lstAnswer
b. and likewise the corresponding variables that have the data type of the variable
and matching the text box name as in:
i. dblLaptopCurrentPrice = 0;
ii. dblDesired Price = 0:
iii. intCounter = 0;
iv. dblTotal = 0;
v. const dblYearlyDeduction = .10
7.The price of laptops is expected to go down by 10% per year. Use a while loop to display the year and price when the price will be under a specified target amount. Allow the user to specify the current price and the target price using TextBoxes .using a loop the number of years it will take for the Laptop to be less than or equal to your desired price.
a. You should clear the list box as the first line of code (before while) in the
calculation area as in : lstAnswer.Items.Clear()
b. Also set before the while statement dblTotal to be the current price
c. The formula (to help you get started in the while)
i. dblTotal = dblTotal * (1 - dblYearlyDeduction)
d. Your list box should show (if you start with 1000)
i. Year 0: $1000.00
ii. Year 1: $900.00
iii. Year 2: $810.00 (continue until you hit your target price)
8. Develop a form that allows the user to project the population of your city for a specified number of years and growth rate. Allow the user to specify the current year’s population, the number of years and the annual growth rate. Use a for loop to compute and display each year, starting with the current year and the corresponding population.
a. Follow the same process as in #7 above.
b. To help you, the formula would be to ADD versus SUBTRACT as in:
i. dblTotal = dblTotal + (dblTotal * desiredGrowthRate)
ii. Sample list box output would be (don’t forget to clear)
1. Year 0: - 10,000
2. Year 1: - 10,500 (if the growth is 5%) etc.
9.Develop a form to display the Fahrenheit temperature and corresponding Celsius temperature for Fahrenheit temperatures ranging from –40 to +40 degrees, at increments of 10. Use a for loop. The conversion formula is
- Celsius = (Fahrenheit - 32) * 5/9
a. Sample output in the list box (don’t forget to clear)
i. F: -40; C: -40
ii. F: -30, C: -34.4
iii. F: -20, C: -28.9
iv. Continue..


Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 2 images

- C# Programming, Chapter 12 Question 6. Create a project naned BreezyViewApartments that contains a Form for an apartment rental service. Allow the user to choose a number of bedrooms, number of baths, and view--street or lake. After the user makes selections, display the monthly rent, which is calculated using a base price of $450, $550, or $700 per month for a one-, two-, or three-bedroom apartment, respectively. $75 is added to the base price for more than one bath, and $50 additional is added to the price for a lake view. Use the Controls that you think are best for each function. Label items appropriately, and the fonts and colors to achieve an attractive design. Any help of input, output and comments through visual studio 2022 and Windows form would be helpful.arrow_forward3. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here} moveCharacter(x: 0, y: 0, facing: .southwest) moveCharacter(x: 0, y: 0, facing: Direction.north) moveCharacter(x: 0, y: 0, facing: .south) moveCharacter(x: 0, y: 0, facing: Direction.northeast)arrow_forwardCompatible with visual studios - c# Word SeparatorCreate an application that accepts as input a sentence in which all the words are runtogether but the first character of each word is uppercase. Convert the sentence to astring in which the words are separated by spaces and only the first word starts withan uppercase letter. For example, the string "StopAndSmellTheRoses." would beconverted to "Stop and smell the roses."arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





