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
A software company sells a package that retails for $99. Quantity discounts are given according to the following table:
Quantity | Discount |
10-19 | 10% |
20-49 | 20% |
50-99 | 30% |
100 or more | 40% |
Write a GUI program that asks the user to enter the number of packages purchased.
The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount.
A successful test run of the program for different inputs is as shown below:
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 2 steps
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
- Using Visual basic, write a Window Application that allows you to enter the amount of money you will like to place as a down payment on a home, the interest rate, and a number of years. For example, if you hope to buy a home in five years with a down payment, would the principal of $17,000 grow over five years at 4 percent interest to a down payment of 20,000? Display a ListBox object for each year and the amount of money in the account at the end of the year. Determine whether you have saved enough money for the home example. Nonnumeric and negative values should not be accepted. Publish the application. Hint: The formula for compound interest for one year is: Amount = Principal * (1 + Rate). For 5 years of compound interest, this formula should be executed 5 times with the principal increasing to the new amount each year. The application should have a single background image and menus. [Note: You can upload ALL the screen shots of your work here.]arrow_forwardInstructions: IMPORTANT: This is a continuation of the previous part of the project and assumes that you are starting with code that fulfills all requirements from that part of the project. Modify the your code from the previous part of the project to make it modular. In addition to the main method, your code must include the following static methods: Method 1 - displayTitle A method that creates a String object in memory to hold the text “Computer Hardware Graphics Quality Recommendation Tool” and displays it Method 2 – getResolutionString A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution. The method should return the appropriate String representation of the monitor resolution. For example, if the method is passed an integer value of 1, it should return a String with a value of “1280 x 720”. (See Step 4 of Project 1) Method 3 – getMultiplierValue A method that accepts an integer value (1, 2, 3, or 4) that denotes the monitor resolution and…arrow_forwardIn python Expense tracker: the user should be able to enter expenses per category (food, clothing, entertainment, rent, etc) and the application should track the expenses per week or month. The user should be able to see their total expenses for a month of their choice for each category and a total monthly expense. The monthly expense report should include average expenses for each category for the year and indicate if the user expense for the month selected is lower or higher than the annual average. Also, the report should display the percentage of expenses from each category out of the total monthly expenses. Project application requirements: Requirements description Basic Points: * Project should have a functioning menu * Project should have adequate functions (minimum 3 functions) * Project should make use of files to save the data * Project should handle adequate exceptions * Project should display information formatted adequately * Project should make use of lists or…arrow_forward
- Modify the Dice Poker program from this chapter to include any or all ofthe following features:a) Splash Screen. When the program first fires up, have it print a shortintroductory message about the program and buttons for "Let's Play''and "Exit." The main interface shouldn't appear unless the user selects "Let's Play."b) Add a "Help" button that pops up another window displaying therules of the game (the payoffs table is the most important part).c) Add a high score feature. The program should keep track of the 10best scores. When a user quits with a good enough score, he/she isinvited to type in a name for the list. The list should be printed inthe splash screen when the program first runs. The high-scores listwill have to be stored in a file so that it persists between programinvocations.arrow_forwardSoftware Requirement Engineering Question: Draw a use case diagram for “Get a Cab” application ‘Get a Cab’ is a Smartphone application. It will search cabs for the passenger, provide them with security by reminding them about their luggage and it will also allow the user to inform the police with the help of a one-click button. This application facilitates the guardians to trace the location of their loved ones. It also lets passengers locate a driver at any instance to overcome all time related issues. If the passenger wants to avail the services of the same driver in future, he/she can add the driver to the favorite list, stored in the application. Write a detail use case for “Search a Cab” function. For searching a cab, the passenger would enter his/her source and destination information and the application would list down all the available cabs in a 1km radius. If application unable to find cab within 1km radius passenger can increase the radius up to 3 km. The passenger would…arrow_forwardusing Visual Basic or VB.netarrow_forward
- Add Fractions problem: create in a sandbox environment. Directions: In this program you will ask the user for 4 integers that represtent two fractions. First ask for the numerator of the first and then the denominator. Then ask for the numerator and denominator of the second. Your program should add the two fractions and print out the result. For example: a sample program run might look like this, Numerator One: 1 Denominator One: 2 Numerator Two: 2 Denominator Two: 5 The sum is 9/10 //remember if you have two fractions, the following formula should be used: a/b + c/d = (a*d +b*c) / b* d public class MyProgram { public static void main(String[] args) { //Ask the user for 4 numbers. (don't forget to import your Scanner class) //create your final numerator //create your final denominator //print out your result like the example abovearrow_forwardCreate an application that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows:1. When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Do not display the computer’s choice yet.)2. The user selects his or her choice of rock, paper, or scissors. To get this input you can use Button controls, or clickable PictureBox controls displaying some of the artwork that you will find in the student sample files.3. The computer’s choice is displayed.4. A winner is selected according to the following rules:• If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.)• If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.)• If one player chooses…arrow_forwardModule main() // Local variables Declare Real budget, spent = 0, amount // Get budgeted amount Call getBudget(budget) // Get amount spent Call getAmount(spent) // display values Call showSpending(budget, spent) End Module // The getBudget module gets amount budgeted for the month Module getBudget(Real Ref inputBudget) Display “Enter amount budgeted for the month: “ Input inputBudget End Module // The getAmount module gets amounts actually spent // terminates on entry of amount = 0 Module getAmount(Real Ref spent) Declare Real inputAmount Do Display “Enter an amount spent: “ Input inputAmount Set spent = spent + inputAmount Until inputAmount == 0 End Module // The showSpending module accepts budget and spent and tells // if over or under budget Module showSpending(Real budget, spent) Display "Budgeted: $", budget Display "Spent: $", spent If budget > spent then Display "Spending less than budget. VERY GOOD!” Else…arrow_forward
- A company has determined that its annual profit is typically 23 percent of total sales. Write a *PYTHON* program Make a *GUI * that asks the user to enter the projected amount of totalsales, then displays the profit that will be made from that amount. Hint: Use the value 0.23 to represent 23 percent. Need the GUI code not the consolearrow_forwardA retail company assigns a $5000 store bonus if monthly sales are more than $100,000; otherwise a $500 store bonus is awarded. Additionally, they are doing away with the previous day off program and now using a percent of sales increase to determine if employees get individual bonuses. If sales increased by at least 4% then all employees get a $50 bonus. If they do not, then individual bonuses are 0. Step 4: Write a module that will ask the user to enter the percent of sales increase in decimal format. This module will have to accept salesIncrease as a reference. Complete the missing lines. //MODULE 3 //this module takes in percent of increase in decimal //format such as .02 for 2 percent. Module getIncrease(Real Ref _________________) Display “________________________________________.” Input ___________________________________________ End Modulearrow_forward// Global constant for calories per minute Constant Real CALORIES_PER_MINUTE = 3.9 // main module Module main() // Local variables Declare Real calories_burned Declare Integer minutes // Set calories burned For minutes = 10 to 30 step 5 Call setCalories(minutes, calories_burned) // display values Call showCalories(minutes, calories_burned) End For End Module // The setCalories module calculates number of calories // from a particular number of minutes. Module setCalories (Integer minutes, Real Ref calories_burned) Declare Real fminutes // some languages require matched type variables for calculations // this expression changes an Integer to a Real type Set fminutes = minutes // variables are now all of the same type Set calories_burned = fminutes * CALORIES_PER_MINUTE End Module // The showCalories module accepts minutes and calories burned // as arguments and displays amounts Module showCalories (Integer minutes, Real calories_burned) Display…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