Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
4th Edition
ISBN: 9780134787961
Author: Tony Gaddis, Godfrey Muganda
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 12, Problem 7PC
Travel Expenses
Create a GUI application that calculates and displays the total travel expenses of a businessperson on a trip. Here is the information that the user must provide:
- Number of days on the trip
- Amount of airfare, if any
- Amount of car rental fees, if any
- Number of miles driven, if a private vehicle was used
- Amount of parking fees, if any
- Amount of taxi charges, if any
- Conference or seminar registration fees, if any
- Lodging charges, per night
The company reimburses travel expenses according to the following policy:
- $47 per day for meals
- Parking fees up to $20.00 per day
- Taxi charges up to $40.00 per day
- Lodging charges up to $195.00 per day
- If a private vehicle is used, $0.42 per mile driven
The application should calculate and display the following:
- Total expenses incurred by the businessperson
- The total allowable expenses for the trip
- The excess that must be paid by the businessperson, if any
- The amount saved by the businessperson if the expenses were under the total allowed
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Theater RevenueA movie theater only keeps a percentage of the revenue earned from ticket sales. The remainder goes to the movie company. Create a GUI application that allows the user to enter the following data into text fields:� Price per adult ticket� Number of adult tickets sold� Price per child ticket� Number of child tickets soldThe application should calculate and display the following data for one night�s box office business at a theater:� Gross revenue for adult tickets sold. This is the amount of money taken in for all adult tickets sold.� Net revenue for adult tickets sold. This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted.� Gross revenue for child tickets sold. This is the amount of money taken in for all child tickets sold.� Net revenue for child tickets sold. This is the amount of money from child ticket sales left over after the payment to the movie company has been deducted.� Total gross revenue. This…
Tip, Tax, and Total Create an application that lets the user enter the food charge for a meal at a restaurant. When a button is clicked, the application should calculate and display the amount of a 15 percent tip, 7 percent sales tax, and the total of all three amounts.
Sales Tax and Total Create an application that allows the user to enter the amount of a purchase. The program should then calculate the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax).
Chapter 12 Solutions
Starting Out with Java: From Control Structures through Data Structures (4th Edition) (What's New in Computer Science)
Ch. 12.1 - What is a user interface?Ch. 12.1 - How does a command line interface work?Ch. 12.1 - Prob. 12.3CPCh. 12.1 - Prob. 12.4CPCh. 12.2 - What is JavaFX?Ch. 12.2 - Prob. 12.6CPCh. 12.2 - Prob. 12.7CPCh. 12.2 - Prob. 12.8CPCh. 12.2 - Prob. 12.9CPCh. 12.2 - Prob. 12.10CP
Ch. 12.2 - Prob. 12.11CPCh. 12.2 - What is the purpose of the Application classs...Ch. 12.2 - Prob. 12.13CPCh. 12.2 - Prob. 12.14CPCh. 12.3 - Prob. 12.15CPCh. 12.3 - Prob. 12.16CPCh. 12.3 - Prob. 12.17CPCh. 12.3 - How do you change the alignment of an HBox...Ch. 12.3 - Prob. 12.19CPCh. 12.4 - Prob. 12.20CPCh. 12.4 - Prob. 12.21CPCh. 12.4 - Prob. 12.22CPCh. 12.4 - Prob. 12.23CPCh. 12.4 - Prob. 12.24CPCh. 12.5 - Prob. 12.25CPCh. 12.5 - Prob. 12.26CPCh. 12.5 - Prob. 12.27CPCh. 12.5 - Prob. 12.28CPCh. 12.6 - Prob. 12.29CPCh. 12.6 - Prob. 12.30CPCh. 12.6 - Prob. 12.31CPCh. 12.6 - Prob. 12.32CPCh. 12.7 - Prob. 12.33CPCh. 12.7 - Prob. 12.34CPCh. 12.8 - Prob. 12.35CPCh. 12.9 - Prob. 12.36CPCh. 12.9 - Prob. 12.37CPCh. 12 - Prob. 1MCCh. 12 - This type of control appears as a rectangular...Ch. 12 - Typically, when the user clicks this type of...Ch. 12 - Prob. 4MCCh. 12 - Prob. 5MCCh. 12 - Prob. 6MCCh. 12 - Prob. 7MCCh. 12 - All JavaFX applications must extend the class. a....Ch. 12 - This container arranges its contents in a single,...Ch. 12 - You use this class to load an image file into...Ch. 12 - You use this class to actually display an image....Ch. 12 - The EventHandler interface specifies a method...Ch. 12 - Prob. 13MCCh. 12 - Prob. 14MCCh. 12 - Prob. 15TFCh. 12 - Prob. 16TFCh. 12 - Prob. 17TFCh. 12 - Prob. 18TFCh. 12 - Prob. 1FTECh. 12 - Prob. 2FTECh. 12 - Assume hbox is an HBox container: // This code has...Ch. 12 - Prob. 4FTECh. 12 - Prob. 5FTECh. 12 - Prob. 1AWCh. 12 - Prob. 2AWCh. 12 - Prob. 3AWCh. 12 - Prob. 4AWCh. 12 - Prob. 5AWCh. 12 - Prob. 6AWCh. 12 - Prob. 7AWCh. 12 - Prob. 8AWCh. 12 - Prob. 9AWCh. 12 - Prob. 10AWCh. 12 - Assume a JavaFX application has a Button control...Ch. 12 - Prob. 12AWCh. 12 - Prob. 13AWCh. 12 - Assume borderPane is the name of an existing...Ch. 12 - Prob. 1SACh. 12 - What is the purpose of the Application classs...Ch. 12 - What is the purpose of the Application classs...Ch. 12 - What purpose do layout containers serve?Ch. 12 - Prob. 5SACh. 12 - What two classes do you use to display an image?Ch. 12 - Prob. 7SACh. 12 - Prob. 8SACh. 12 - Prob. 9SACh. 12 - Prob. 10SACh. 12 - Prob. 11SACh. 12 - Latin Translator Look at the following list of...Ch. 12 - Name Formatter Create a JavaFX application that...Ch. 12 - Tip, Tax, and Total Create a JavaFX application...Ch. 12 - Property Tax A county collects property taxes on...Ch. 12 - Prob. 5PCCh. 12 - Prob. 6PCCh. 12 - Travel Expenses Create a GUI application that...Ch. 12 - Joes Automotive Joes Automotive performs the...Ch. 12 - Tic-Tac-Toe Simulator Create a JavaFX application...Ch. 12 - Prob. 10PC
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
- Create an application that calculates and displays two raise amounts, which are based on an employee’s current salary. The current salary will be entered by the user. The two raise rates are 5% and 8%. In addition to the raise amounts, the application should also calculate and display the employee’s new salaries. Include a button in the interface that the user can click to clear the user input and calculated results from the screen. Prepare a Planning Chart for the application. Draw a sketch of an appropriate interface. Be sure to follow the GUI design guidelines covered in the chapter. The guidelines are summarized in Figure 2-20. (If you want to include an image in the interface, you can either use your own image file or download an image file from openclipart.org. When downloading from openclipart.org, be sure to use the SMALL IMAGE (.PNG) button.) Create a Windows Forms application. Use the following names for the project and solution, respectively: Salary Project and Salary Solution. Save the application in the VB2017\Chap02 folder. Use your Planning Chart as a guide when building the interface. Code the Exit button. (You do not need to code the button that calculates and displays the raises and new salaries or the button that clears the user input and calculated results.) Save the solution and then start the application. Test the access keys, tab order, and Exit button and then close the solution.arrow_forwardYou create your application’s user interface in the _____ window in the IDE. designer form GUI interfacearrow_forwardAndroid Studio with Javaarrow_forward
- Create an application that lets the user enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses and the total annual cost of these expenses.arrow_forwardAttributes, like those of other controls, determine whether or not a control appears on a form during application execution.arrow_forwardDORM AND MEAL PLAN CALCULATOR A university has the following dormitories: Allen Hall $1,500 per semesterPike Hall $1,600 per semesterFarthing Hall $1,800 per semesterUniversity Suites $2,500 per semesterThe university also offers the following meal plans:7 meals per week $ 600 per semester14 meals per week $1,200 per semesterUnlimited meals $1,700 per semesterCreate an application with two forms. The main form should allow the user to select a dormitory and a meal plan. The application should show the total charges on the second form. For this assignment, you will create two forms (each form is an object). On the first form you will have two list boxes. One will display the Dormitories and the other one will display the Meal Plans. The user will select one Dorm and one meal plan. The user will then click a button the will open up a second form and show the results. I would suggest that you store the Dormitories is a two dimensional array for name and cost. I would suggest that you…arrow_forward
- Create a simple interactive system that will solve a simple task/problem in your own household. Full documentation must be submitted in pdf file. Follow the list below for the contents of your documentation. In case you do not have an app to draw your system, handwritten output will do as long as it is clearly and neatly drawn. A) Name of your Interactive System B) Picture/Image of your Interactive System - Identify each part of your system and its usage C) Complete the Table · Read the definition of these components in our previous module to be able to fill-up the table properly Lexical Syntactic Semantic D) Answer the question, "Why is your Interactive System Important in your Household?"arrow_forwardFalling Distance When an object is falling because of gravity, the following formula can be used to determine the distance the object falls in a specific time period: d =1/2gt2 The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the amount of time in seconds that the object has been falling. Create an application that allows the user to enter the amount of time that an object has fallen and then displays the distance that the object fell. The application should have a method named FallingDistance. The FallingDistance method should accept an object’s falling time (in seconds) as an argument. The method should return the distance in meters that the object has fallen during that time interval.arrow_forwardThe Paste Special dialog box offers the ____ option, which enables you to copy and paste a cell range that contains one or more blank cells where the blank cells are not pasted over any existing values in the range into which they are pasted.arrow_forward
- At runtime, a control's attribute determines whether or not the control displays on the form.arrow_forwardLab Tasks: You are going to develop a simple application which has two screens: • Screen1 contain four controls: TextView show "Enter your email address and password", Edittext1 to get email address and Edittext2 to get password from the user and Button to take user to next screen Screen2 contains only one control – TextView which displays greet messagearrow_forwardTEMPERATURE CONVERTER WEBSITE The user will input a temperature in either Fahrenheit or Celsius and press a "convert" button. The converted temperature will then be displayed with the correct unit. Your Ul should include four main elements: Input field for the user to type in their temperature - don't forget to validate that the input is a number! Dropdown menu or radio button for the user to choose if they are inputting in Celsius or Fahrenheit "Convert" button to trigger the temperature conversion Display area for the final converted temperature and unit For an extra challenge: You can add in a third conversion option to convert from and to Kelvin as well. please Don't Copy from internetarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Enhanced Discovering Computers 2017 (Shelly Cashm...Computer ScienceISBN:9781305657458Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. CampbellPublisher:Cengage Learning
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Enhanced Discovering Computers 2017 (Shelly Cashm...
Computer Science
ISBN:9781305657458
Author:Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:Cengage Learning
Time Complexity Analysis - How To Calculate Running Time | InterviewBit; Author: InterviewBit;https://www.youtube.com/watch?v=--oxG4Q1PA0;License: Standard YouTube License, CC-BY