Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Write a
If the units consumed are <=300, then the cost is Rs. 12 per unit.
If the units consumed are >300 and <=500, then the cost is Rs. 17 per unit. If the units consumed exceed 500 then the cost per unit is Rs. 22
A line rent of Rs. 1500 is also added to the total bill and surcharges of 5% extra if the bill exceeds Rs. 15000. Calculate the total bill with all the conditions given above.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Suppose you have a certain amount of money in a savings account that earns compoundmonthly interest, and you want to calculate the amount that you will have after a specificnumber of months. The formula is as follows: F=P×(1+i)tF=P×(1+i)t The terms in the formula are: • F is the future value of the account after the specified time period.• P is the present value of the account.• i is the monthly interest rate.• t is the number of months.• F is the future value of the account after the specified time period.• P is the present value of the account.• i is the monthly interest rate.• t is the number of months. $$ Write a program that prompts the user to enter the account’s present value, monthly interest rate, and the number of months that the money will be left in the account. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should display the account’s future value.arrow_forwardа. Write a program that calculates and prints the fare for an airline. There are two plans: Plan Ticket fare Baggage Weight Fare Tax Economy 1200 $ 25 18% or 10% Business 3000 $ 35 20% or 12% Extra weight is charged by 20$/Kg for Economy, and 15$ for Business. A fare tax is added to the ticket fare: 18% for Economy and 20% for Business if the ticket type is "roundtrip". The fare is 10% for Economy and 12% for Business if the ticket type is "one-way". The tax percentage is applied on the original ticket fare. i. Ask the user to enter the Customer ID. A valid Customer ID must contain 5 digits. If the user inputs an invalid Customer ID the user must re-enter the account. Ask the user to enter the plan code (The user will enter e or E for Economy and b or B for Business). Any invalid input must be corrected by asking the user to re-enter. ii. iii. Ask the user to enter the weight. You may assume that the user will not enter a negative number. iv. Ask the user to enter 'y' if it is a…arrow_forwardYou are working for a lumber company, and your employer would like a program that calculatesthe cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber.Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: (image 1) The lumber is sold in different dimensions (specified in inches of width and height, and feet oflength) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which whendivided by 12 = 5.333 board feet). An entry from the user will be in the form of a letter and fourinteger numbers. The integers are the number of pieces, width, height, and length. The letter willbe one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When theletter is T, there are no integers following it on the line. The program…arrow_forward
- Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for a dozen eggs, or 45 cents for individual eggs that are not part of a dozen. Write a program that prompts a user for the number of eggs in the order and then display the amount owed with a full explanation using the following wording: You ordered 27 eggs. That’s 2 dozen at $3.25 per dozen and 3 loose eggs at 45 cents each for a total of $7.85. So far everything is right but something in my equations is causing my ouput to show up as 45.0arrow_forwardpython3 problemarrow_forwardWrite a program that will calculate the cost of carpeting. We-do-Carpets is a company that specializes in carpeting homes. The company is interested in new software for their sales staff. The software needs to provide quotes to potential customers. Your program should: Prompt the user to enter in lengths and widths for the following rooms Living Room Master Bedroom Family Room Kids Bedroom Calculate the cost of carpeting for each room Calculate the sub total cost for all rooms Calculate the 6.625 NJ Sales Tax Calculate the grand Total use java programming Your program must be formatted according to the output Sample Outputarrow_forward
- An International Internet phone company has three different subscription packages for its customers:Package A: For $9.95 per month 5 hours of call time are provided. Additional usage costs $0.08 per minute.Package B: For $14.95 per month 10 hours of call time are provided. Additional usage costs $0.06 per minute.Package C: For $19.95 per month unlimited call time is provided.Write a program that calculates a customer’s monthly bill. It should input customer name, which package the customer has purchased, and how many hours were used. It should then create a bill that includes the input information and the total amount due. Wherever possible use named constants instead of numbers.arrow_forwardFor this assignment, write a program named PizzaPrices that prompts the user to make a choice for a pizza size - S,M, L, or X - and the number of pizza the user wants to order. The price for different size pizzas are $6.99, $8.99, $12.5, and $15.0 respectively. There is also a discount based on the number of pizza ordered: no discount for one pizza, 10% discount for 2 pizzas, 15% discount for 3-5 pizzas, and 20% for more than 5 pizzas. Display a full accounting of the transaction, similar to the sample screenshot. Please make sure you use parallel arrays and range match in your solution.arrow_forwardIn C program Write a program that calculates mileage reimbursement for a salesperson at a rate of $.35 per mile. Your program should interact with the user in this manner: MILEAGE REIMBURSEMENT CALCULATOR Enter beginning odometer reading=> 13505.2 Enter ending odometer reading=> 13810.6 You traveled 305.4 miles. At $ 0.35 per mile, your reimbursement is $ 106.89.arrow_forward
- Imagine you are working for a lumber company, and your employer would like a program that calculates the cost of lumber for a customer order. The company sells pine, fir, cedar, maple, and oak lumber. The lumber is priced by board feet. One board foot equals one square foot that is one inch thick. The price per board foot is given in the following table: Pine 0.89 Fir 1.09 Cedar 2.26 Maple 4.50 Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). Create a blank c++ Give the customer instructions and then ask the user (customer) to identify the items they wish to purchase by inputting the type of wood, the length, width, & heights of the board, and the number of boards they desire. Allow the user to…arrow_forwardWrite a program that computes the value of following mathematical equation: x^2-(2xy)+y^2 => if x is greater than y and y is less than 5 x^2+y^2 => if x is equal to y x^2+(2xy)+y^2 => otherwise the value of x and y should be taken from the user. Assume x and y are integer values. The program should print one of the following messages as an output depending upon which condition is true: The value of the expression 'x^2-(2xy)+y^2' is The value of the expression 'x^2+y^2' is The value of the expression 'x^2+(2xy)+y^2' is The blank should include the evaluated value of the expression. Note there is a quote at the start and end of the equation in the print message.arrow_forwardthere are three seating categories at a stadium. for a softball game, class A seats are $30, Class B seats are $20 and Class C seats are $15. Write a program that asks how many tickets for each class of seats were sold and then displays the amount of income generated from ticket sales.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education