Application that simulates the functionality of the gas pump

Assignment Help DOT NET Programming
Reference no: EM13808494

Lab Assignments - Methods

Objectives

In this lab assignment, students will learn:
- How to define methods and functions
- How to call methods or functions
- How to specify parameters and how to pass arguments by value

In this lab assignment, you will create a "Gas Pump" application. A gas pump calculates the cost of gas based on the grade of gas. The station charges
· $2.69 per gallon for Regular grade gas
· $2.79 per gallon for Special grade gas
· $2.89 per gallon for Super grade gas

· Create a windows form application that simulates the functionality of the gas pump.

· The user enters the number of gallons to purchase in a TextBox.

· Click the desired grade button (each grade is represented by a Button whose Text properties are set to Regular, Special and Super).

· The total cost will be calculated and displayed on the form.

· In each Button's Click event handler methods -

o Read user's input from TextBox.
o Call a function to calculate total cost by passing number of gallons and grade of gas. The grade of gas can be retrieved from the Text property of each Button.
o Display the total cost on the form.

· Define a function to calculate total cost. This function

o Requests the values of number of gallonsand grade of gas ("Regular", "Special" or "Super").
o Calculates total cost.
o Returns the total cost.

Reference no: EM13808494

Questions Cloud

Impact of globalization on us businesses : Prepare a 4-6 page paper that describes the impact of globalization on U.S. businesses. In your analysis, please include information about the impact of at least four economic drivers that might impact globalization.
Premium for financial risk : Ethier Enterprise has an unlevered beta of 1.25. Ethier is financed with 45% debt and has a levered beta of 1.45. If the risk free rate is 5.5% and the market risk premium is 5%, how much is the additional premium that Ethier's shareholders require t..
Demand for the products is given by the following linear : Two companies (A and B) are duopolists who produce identical products. Demand for the products is given by the following linear demand function: P = 10,000-Qa-Qb
How would you determine who your audience is : How would you determine who your audience is
Application that simulates the functionality of the gas pump : Create a windows form application that simulates the functionality of the gas pump. The user enters the number of gallons to purchase in a TextBox. Click the desired grade button (each grade is represented by a Button whose Text properties are set t..
What are the major responsibilities of state fire marshals : What are the major responsibilities of state fire marshals. Why is this role significant in statewide fire prevention, investigation, enforcement, and fire safety
Simple economy that produces only four goods and services : Suppose the information in the following table is for a simple economy thatproduces only four goods and services: shoes, hamburgers, shirts and cottons. Assume all the cotton is used in the production of shirts. Use the information in the table to ca..
What is the definition of assimilation : What is the definition of assimilation
Write a recursive method to print all permutations of string : Write a recursive method to print all the permutations of a string. For instance, for a string abc, the printout is: abc acb bac bca cab cba

Reviews

Write a Review

DOT NET Programming Questions & Answers

  Allow the user to input the first and last base values

Write a C# program that produces a multiplication table. Allow the user to input the first and last base values for the multiplication table. Display a column in the table beginning with the first base inputted value

  Write a c# program containing array that holds five integers

Write a C# program containing an array that holds five integers. Assign values to the integers.Display the integers from first to last, and then display them from last to first. Save theprogram as IntegerList.cs.

  Name some form controls used with dotnet

Managing validation becomes a rather onerous task when you have to design a contact form, an event registration form, a sign in form, etc. What are some form controls used with .NET? Explain your answer.

  Create a c# program that includes a coffeeorder class

Create a program that includes the following requirements: Create a CoffeeOrder class

  Very boards does a big business in shirts especially for

very boards does a big business in shirts especially for groups and teams. they need a project that will calculate the

  Define annual salary calculator

Create a simple ASP.NET web application using Microsoft Visual Studio 2008 that displays the text "Hello, World" on the home page. You will also add a page and build an Annual Salary Calculator on that page. This will be used as the foundation for..

  Postel s 2001 february safeguarding our water growing more

postel s. 2001 february. safeguarding our water growing more food with less water. scientific american 2842

  Implementing the insurance management system

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

  Use linq to sort the list in ascending order

Write a console app that inserts 30 random letters into a List . Perform the following queries on the List and display your results: Use LINQ to sort the List in ascending order

  Develop an asp.net web page

Develop an ASP.NET web page that will allow the students to submit information about themselves, and the courses that they are taking on-line. The information will be stored in an MS-SQL Server Express 2008 database, named College.

  1- true or false tomcat allows you to deploy multiple java

1- true or false tomcat allows you to deploy multiple java web applications in your web apps folder in your home

  Prepare a web application

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

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