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)

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education