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

  Create a home page with navigation bar

Create a home page with navigation bar to the three (3) pages with images listed below and a Cascading Style Sheet (.css) for bisque color and Arial text.

  C# visual basic 2012 design stick figure for hangman game

Hangman is a favorite childhood game. using C# visual basic 2012 Design the stick figure for this game

  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

  Asp.net and database web application

Database table definition is provided along with the marking craitria for better answer

  Determine and print the average age of your family

Determine and print the average age of your family and print the names of anyone who lives in Texas. There are 4 components of your submission including

  The data for 10 professional baseball teams for the year

the data for 10 professional baseball teams for the year 2001 is given below. write a c console application that does

  Develop an app that generates a random number

Develop an app that generates a random number and prompts the user to guess the number. When the user clicks the  New Game  Button, the app chooses a number in the range 1 to 100 at random

  1 develop and test a web services based application that

1 develop and test a web services based application that meets the following requirements applying soa design

  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

  Concepts of home directory

In this lab you will learn the concepts of home directory, working directory, absolute pathname, and relative pathname. You will learn to use cd to make another directory the working directory, pwd to display the name of the working directory, rm ..

  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.

  Give their telephone numbers using one or more letters

People sometimes give their telephone numbers using one or more letters. write a program that accespts a 10 digit telephone number that may contain one or more letters. display the corresponding number using numerlas. the numbers and letters are a..

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