Purchase Solution

Pseudo Code Programming

Not what you're looking for?

Ask Custom Question

The assignment is an assignment in which you, a software developer has won a contract to develop a program that will calculate a customer's charges and total bill at the gasoline pump, taking into account the following:

o The per-gallon price for gas is determined by whether the customer purchases leaded or unleaded gasoline.

o A federal gasoline tax is applied to each gallon of gas, varying by whether the gas is leaded or unleaded.

o If the customers pump the gas themselves, there are no additional charges apart from state sales tax. If the customers do not pump the gas themselves, one of the following two service charges apply:

· Gas-n-Go charge: If the customer asks for Gas-n-Go (the station pumps the gas for the customer but performs no other service), a fixed service charge is applied to the bill. The charge does not vary by the amount of gas purchased; the price remains the same whether the customer purchases a half gallon of gas or 10 gallons.

· Full-Service charge: If the customer asks for Full-Service (the station pumps the gas, checks the oil, checks the air pressure in the tires, and cleans the car windows), a fixed charge is applied to the bill. The charge does not vary by the amount of gas purchased; the price remains the same whether the customer purchases a half gallon of gas or 10 gallons.

o A state sales tax is applied to the sum of all charges except for the federal gasoline tax

Purchase this Solution

Solution Summary

This posting contains the solution to the given problem in a Word file attached, consisting of the pseudocode for the program.

Solution Preview

Begin Program:

//Initialize Variables to be used in the program
Initialize Leaded_Price = user-defined value;
Initialize Unleaded_Price = user-defined value;
Initialize Fed_Gas_Tax_Leaded_Rate = user-defined value;
Initialize Fed_Gas_Tax_Unleaded_Rate = user-defined value;
Initialize Gas_n_Go_Charge = user-defined value;
Initialize Full_Service_Charge = user-defined value;
Initialize State_Sales_Tax_Rate = user-defined value;
Initialize Gallons;
Initialize State_Sales_Tax;
Initialize Fed_Gas_Tax;
Initialize Gas_Choice;
Initialize Gas_Cost;
Initialize ...

Purchase this Solution


Free BrainMass Quizzes
Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.