Concept explainers
(Parking Charges) A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24-hour period is $10.00. Assume that no car parks for longer than 24 hours at a time. Write an application that calculates and displays the parking charges for each customer who parked in the garage yesterday. You should enter the hours parked for each customer. The
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Java How To Program (Early Objects)
- homework Instructions: For each Exercise below, write your code in an IDE and run your code within the IDE as well. Once you have satisfied the Exercise requirements, paste your code below under the corresponding Exercise. Exercise 1: Create a Basic Calculator application using the switch statement. Your program should prompt the user to "Enter an operator (+,-, *, /): "and then take in two numbers from the user "Enter #1: "and "Enter #2: ". Use a switch to solve this. ● Don't forget to include a default case. Example (Expected) Output: ● ● Enter an operator (+, -, *, /): + Enter two numbers: 2.3 4.5 2.3+ 4.5 = 6.8arrow_forwardWhat happens if you run the application with an error?arrow_forwardIntro to Python Programming: ATM Application When you use an automated teller machine (ATM) with your bank card, you needto use a personal identification number (PIN) to access your account. If a user failsmore than three times when entering the PIN, the machine will block the card.Create the ATM Application.The application asks the user for the PIN no more than three times, and does thefollowing:• If the user enters the right PIN, the application should ask the user to choose anaccount (checking or savings), and display its balance.• If the user enters a wrong PIN and, if the application has asked for the PIN lessthan three times, it should ask for it again.• If the user enters a wrong PIN three times, the application should print amessage saying “Your bank card is blocked”.Assume that the user’s checking account balance is $1450.56 and his/her savingsaccount balance is $10. Also assume the user’s PIN is “9554”. SAMPLE RUNEnter your PIN: 1353Enter your PIN: 9555Enter your PIN:…arrow_forward
- Program Purpose - Professional Athletes often hire other professionals to help take care of matters for them. We will group them in four categories: Lawyers, Personal Assistants, Agents, and Trainers. They all get paid a percentage of the athlete's total yearly salary. Lawyers - 10%, Personal Assistants - 3%, Agents - 7%, and Trainers - 5% . Prompt the user to enter the athlete's salary for the year (ensure that the entered value is positive). The user should then enter the name and category of each of the hired professionals. The athlete should be able to hire as many professionals in each category as he/she wants, even if it is more than he/she can afford. Based on the category, calculate the amount that each professional should be paid. After all data has been entered, print the names of each professional hired, how much each is being paid, the total amount the athlete paid, and how much the athlete has left.arrow_forwarddesign pattern question :- Using the state pattern, you have to implement an application that help track the item ordered from online shop. The client orders an item from online shop, then item can go to post office, then it will be delivered to the user home. Or the item after being ordered it goes to the post office, then the user will pick it up from the post office. In both cases; either take the item from the post office or has it delivered to the client's home represents the end of the process. Q1)Draw the state diagram that shows all possible states and transitions? Q2) Write code of the Ordered state? Q3) Write the implementation of the ShopOrder class; most important things are the states declaration, the constructor, a function to return robot statearrow_forward(Calculating the Product of Odd Integers) Write an application that calculates the product of the odd integers from 1 to 15.arrow_forward
- code using python, and avoid using special commendsarrow_forward99 question Reza Enterprises sells tickets for buses, tours, and other travel services. Because Reza frequently mistypes long ticket numbers, Reza Enterprises has asked his students to write an application that shows if a ticket is invalid. Your application/program tells the ticket agent to enter a six-digit ticket number. Ticket numbers are designed so that if you lose the last digit of the number, then divide by 7, the remainder of the division is exactly the same to the last dropped digit. This process is shown below: Step 1: Enter the ticket number; for example 123454 Step 2: Remove the last digit, leaving 12345 Step 3: Determine the remainder when the ticket number from step 2 is divided by 7. In this case, 12345 divided by 7 leaves a remainder of 4. Step 4: Display a message to the ticket agent indicating whether the ticket number is valid or not. If the ticket number is valid, save the number to a .txt file called “tickets.txt” and.arrow_forwardFlowchart that converts temperature (Fahrenheit to Celsius, and vice versa)arrow_forward
- Modify the code to add a push button: Once the code runs it should display the temperature in Fahrenheit only in the serial monitor and when the pus button is pressed the temperature should convert to Celsius . And when it pressed again it should go back to Fahrenheit.  Right now the code is working but it’s showing the temperature both in cel and Fahrenheit together in the serial monitor . Please modify as asked. Thanksarrow_forwardFinancial Assistance Application Create the Financial Assistance Application. A non-governmental organization needs your application to calculate the amount of financial assistance for needy families. The formula is as follows: • If the annual household income is between $30,000 and $40,000 and the house- hold has at least three children, the amount is $1,000 per child. • If the annual household income is between $20,000 and $30,000 and the house- hold has at least two children, the amount is $1,500 per child. • If the annual household income is less than $20,000, the amount is $2,000 per child. Implement a function for this computation. The program asks for the household income and number of children for each applicant, printing the amount returned by your function. Use -1 as a sentinel value for the input. The program output should be formatted as shown in the Sample Run. Note: You must use at least one function in your code.arrow_forwardOVERVIEW OF PROJECT: Develop project as windows console application and windows forms application to simulate the basic functionality of ATM machine, which deal with the following basic transactions of ATM machine: 1) Balance checking. 2) Cash withdrawal. 3) Cash deposition. 4) Quit You can opt any of the above transaction according to your need of transaction. In case of invalid input regarding choice selection and money withdrawal, appropriate message should be displayed. PROJECT INSTRUCTIONS: a) The valid user id is "admin" b) The valid pin is 1234 c) Assume that there is SAR-20,000 already present in the account d) Money drawn should be multiple of 500 i.e. you can only draw 500, 1000, 1500,...etc. e) Use Modular Approach to solve the problem. f) Test and evaluate your program against multiple test cases.arrow_forward
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning