Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Create visual logic flow chart from the following pseudocode.

Begin Program:

//Initialize program variables
Initialize Regular_Price = 3.00;
Initialize Premium_Price = 3.20;
Initialize Fed_Gas_Tax_Regular_Rate = .10;
Initialize Fed_Gas_Tax_Premium_Rate = .10;
Initialize Gas_n_Go_Charge = 1.00;
Initialize Full_Service_Charge = 2.00;
Initialize State_Sales_Tax_Rate = .05;
Initialize Gallons;
Initialize State_Sales_Tax;
Initialize Fed_Gas_Tax;
Initialize Gas_Choice;
Initialize Gas_Cost;
Initialize Service_Type;
Initialize Extra_Charge;
Initialize Total_Cost;

//User to input the type of gas loaded.
Display "Enter Type of Gas: Regular or Premium. ";
Input Gas_Choice;

//User to input the amount of gas loaded
Display "Enter amount of gallons: ";
Input Gallons;

//User to input the type of service offered to the customer
Display "Enter type of service rendered: Gas-n-Go, Full-Service, None. ";
Input Service_Type;

//Gas cost and federal gas tax for Regular
If (Gas_Choice == "Regular")
{
Gas_Cost = Gallons * Regular_Price;
Fed_Gas_Tax = Gallons * Fed_Gas_Tax_Regular_Rate;
}
//Gas cost and federal gas tax for Premium
Else if (Gas_Choice = "Premium")
{
Gas_Cost = Gallons * Premium_Price;
Fed_Gas_Tax = Gallons * Fed_Gas_Tax_Premium_Rate;
}

//Extra charge for Gas nâ?? Go
If (Service_Type == "Gas-n-Go")
Extra_Charge = Gas_n_Go_Charge;
//Extra charge for Full Service
Else if (Service_Type == "Full-Service")
Extra_Charge = Full_Service_Charge;
//No extra charge if no extra service was given
Else if (Service_Type == "None")
Extra_Charge = 0;

// State Sales Tax
State_Sales_Tax = State_Sales_Tax_Rate * (Gas_Cost + Extra_Charge);

// Total Cost to be billed to the customer
Total_Cost = Gas_Cost + Extra_Charge + State_Sales_Tax + Fed_Gas_Tax;

//Display of Cost
Display "Total Gas Cost: ";
Display Gas_Cost;
Display "Service Charge: ";
Display Extra_Charge;
Display "Federal Gas Tax: ";
Display Fed_Gas_Tax;
Display "State Sales Tax: ";
Display State_Sales_Tax;
Display "Total Amount: ";
Display Total_Cost;

End Program:

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91616370
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in DBMS

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

Question 1 what isdata-manipulation language dml there are

Question: 1. What isData-Manipulation Language (DML)? There are four types of access in DML, explain each one. 2. Assume we have a Library Database consists of the following relations: author(author_id, first_name, last_ ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

Sql query assignment -for this assignment you are to write

SQL Query Assignment - For this assignment you are to write your answers in a word document. This assignment is in three parts: Part A (reporting queries), Part B (query performance), Part C (query design). For this assi ...

Systems analysis project scenic routes operates a bus

Systems analysis project Scenic Routes operates a bus company that specializes in travelling on secondary roads, rather than Interstate highways. Their slogan is: "It Takes a Little Longer, But It's Scenic." The firm nee ...

Questionsuppose a prolog database exists that gives

Question: Suppose a Prolog database exists that gives information about states and capital cities. Some cities are big, others small. Some states are eastern, others are western. a. Write a query to find all the small ca ...

Sqlwrite a select statement that returns one column from

SQL Write a SELECT statement that returns one column from the Vendor table named Full Name. Create this column from the VendorContactFName and VendorContactLName columns. Format it as follows: last name, comma, first nam ...

Suppose that you have designed a database for morgan

Suppose that you have designed a database for Morgan Importing that has the following tables: EMPLOYEE (EmployeeID, LastName, FirstName, Department, Phone, Fax, EmailAddress) STORE (StoreName, City, Country, Phone, Fax, ...

Question talk about the importance of pulling data from

Question : Talk about the importance of pulling data from worksheets into a single sheet also the ways excel could be a solution to a complex challenge. The response must be typed, single spaced, must be in times new rom ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As