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

  Develop web services based application

Develop and test a Web services based application that meets the requirements applying SOA design principles.

  Design style elements in asp

Add drop down lists for modifying the different style elements for the label element that displays the time

  Create a shopping cart in asp

The users will use a browser to access the on-line store. The web server software for the production web server is Windows 2003 Server /IIS6.

  Inventory management system in c# application

Inventory management system in c# application

  Using .net resources to teach .net

This project will use the .NET framework to produce a set of materials to demonstrate the fundamental principles of .NET. Ideally it should demonstrate some of the principles of the framework e.g. interoperability.

  Prepare a marymount faculty site

Prepare a Marymount faculty site

  Blinky lights

Analysis proving that your code blinks the LEDs at the specified rates.

  Prepare a web application

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

  Implementing the insurance management system

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

  Describe the characteristics of visual studio 2005

Describe the characteristics of Visual Studio 2005 Visual Studio.Net is a suite of products that includes 4 main languages. Name these languages and outline their use in industries

  What is a connectionstring

What is a ConnectionString. Give a suitable example to illustrate the various part of a ConnectionString

  Prepare a web application for internet service provider

Prepare a Web application and write the code also event planning document base. This web application allows the user to sign up for an Internet service provider for home connectivity.

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