Airline companies apply baggage restrictions for their passengers. An airline company has decided to apply a 10kg limitation for passengers' hand luggage and 20kg for their normal baggage. When passengers arrive, they enter their hand and normal luggage weight from the keyboard. If passengers exceed their normal baggage allowance of 10 dollars per gram, they pay 12 dollars per kg. Accordingly, write the program that calculates the baggage price of the airline they will go to according to the baggage values entered by the arriving passenger and keeps this from closing the program for each passenger. Note: If hand and normal baggage allowances are stretched below the maximum value, the payment amount will be considered not negative. An example printout is given on the right.
Q: EXERCISE 5.3 Verify whether (a → b) → b is a tautology. Is the following proof correct? If not, what…
A: A tautology is a formula that is always true, regardless of the truth values of its propositional…
Q: Given main(), define the Artist class (in file Artist.java) with constructors to initialize an…
A: The prompt is asking to create two Java classes: Artist and Artwork. The Artist class should have…
Q: We discussed conditional branching and decided that a branch negative instruction is not necessary.…
A: In this question we have to understand and show a sequence of branch instructions that will cause a…
Q: When working with 1024K words, how many address bits are required?
A: The answer is:-
Q: Explain Resource Allocation Graph with an example, also draw two diagrams one for the deadlock…
A: Below I have provided a Solution for the given question.
Q: Write a JavaFX program with the following controls: Two RadioButton controls with the values…
A: The java code is given below with output screenshot
Q: Can you provide a short explanation of the many sorts of interruptions and how each type is crucial…
A: In this question, it is asked to list the types of interruptions in the computer system. It is also…
Q: i need the answer in matlab best wishes 2) Exercise 2\ Write a function to find the factorial of any…
A: We need to write a Matlab function for factorial of a number.
Q: Mapping: Create relational schemas for the ER diagram given below. Indicate clearly the primary and…
A: The processes to generate the relational schemas for the provided Entity Relationship diagram are…
Q: For function f(n)=log n and time t=1 second, determine the largest size n of a problem that can be…
A: - We have to get the maximum number n fow which the time to solve becomes 1 second.
Q: scheme then the parent gets total commission of 10% from each of its child members. Child members…
A: In this question, a problem statement is provided which gives the condition of a chain marketing…
Q: The steps of Compiler's functionality are as follows. Provide a summary of each phase and an…
A: Phases of Compiler's functions Example each phase? Compilation has stages. Each stage has a source…
Q: Try a 8051 microcontroller assembly code for the robotic gripper below that can perform the 3…
A: Please refer to the following step for the complete solution to the problem above.
Q: Problem 1: Designing Context-Free Grammar Let Σ₁ = {0, 1,2,3} and E₂ = {a, b}. Consider the…
A: A context-free grammar consists of a set of terminal symbols, which are the characters in the…
Q: Instructions Meadowdale Dairy Farm sells organic brown eggs to local customers. It charges $3.25 for…
A: Introduction Java class: The class is a basic building block in object-oriented programming. It can…
Q: If someone mentions the word "scope," what do they mean by that?
A: The act or practice of gazing or examining, as for the purpose of evaluation or appreciation.
Q: Using Access, create a view for Pitt Fitness that displays all the classes held at the Downtown…
A: Introduction: A view is a fictitious table whose data is determined by a query. An identical…
Q: For this reason, monitoring and planning are often seen as closed systems. How do supervisors go…
A: Introduction: The process of directing a team's performance to meet corporate success criteria…
Q: Tips for 3.8 lab assignment: user_numbers = [ ] user_input = int(input()) while user_input > 0: ……
A:
Q: How can I show audio/video material in HTML using the video and audio elements?
A: Use the HTML or <audio> element to embed video/audio content in a document. The video/audio…
Q: Which of the following is NOT a benefit of automated patching of systems? It can reduce the…
A: Automated patching of systems allows us to:- reduce the opportunity of attackers who can exploit…
Q: In what ways is network performance measured, and what metrics are used to draw conclusions from…
A: There are several ways to measure network performance and various metrics that can be used to…
Q: When to use abstract classes: To implement the same or different behaviour among multiple related…
A: Abstract classes create "is a" relations while interfaces provide "has a" capability.This can be…
Q: js code to Serializing and restoring class instances You can use a custom toJSON method and reviver…
A: recovering class instances after serialisation: To send instances of your own class in JSON, use a…
Q: Given that central processing units are printed and electricity can't be changed, how can we predict…
A: Energy Transitions: The Central Processing Unit is referred to as the CPU. It might be considered…
Q: If you can't remember where you stored update.txt on your computer, it's a good idea to print a…
A: How to Find the File's Location: If you just know the file's name and not its location, you may…
Q: Write code in python - Problem 3 A bag contains 45 apples, 65 oranges and 30 bananas. Find the…
A: 1.Start 2.Create a dictionary bag.Dictionaries are used to store data values in key:value pairs.…
Q: Write the cycle of the "ADD E" instruction in Register Transfer Notation.
A: The following phases are included in the instruction execution cycle: fetch decode Execute store…
Q: There is no way to alter the CPU's clock speed since it is printed and electricity is fixed. To put…
A: It is generally not possible to alter the clock speed of a CPU (Central Processing Unit) by changing…
Q: Since an eight-core CPU only has a single memory channel, multitasking is problematic. So, how do we…
A: A processor is a small integrated circuit in computers and other devices. It accepts input and…
Q: Exactly what are the three essential parts of a network that must be in place for it to function…
A: A computer network is a set of computers in which computers share their resources with each other.…
Q: Write down the bit pattern in the fraction of value1/3 assuming a floating point format that uses…
A:
Q: A scientist has developed a mathematical model for a physical process, and he wants to check how…
A: Dear Student, The required source code, implementation and expected output of your program is given…
Q: wnvote for wrong. And same
A: PROGRAM INSTRUCTIONS: - Importing the essential headers and using the namespaces. Defining the…
Q: If you worked as an attorney in the Legal department, would you want different language in the…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. To meet…
Q: cursive implementation of Euclid's Algorith for finding the greatest common divisor (GCD) of two…
A: Dear Student, As no programming language is mentioned I am assuming it to be Python, source code,…
Q: Do you believe the advent of high-density, high-speed memory devices and CPUs has had an impact on…
A: successful technological and scientific endeavor. Achieved effective integration of software…
Q: Give me a java code for ResponseStatus 400 email and the password doesn't match in the spring boot…
A: PostMapping is used to handle POST type of request method, it also maps to a specific holder method,…
Q: et {a, b}: a(aa)*(Ʌ+
A: RE The given pair of regular expressions defined the same language
Q: Analyze and evaluate many alternative back-end compiler
A: Front and back modules make up the compiler. Its front-end includes a lexical analysis, semantic…
Q: The central processing unit (CPU) and memory should be connected through a synchronous or…
A: Dear Student, The answer to your question is given below -
Q: What do these phases of the compiler really accomplish? Walk us through a couple examples of each…
A: Passes are the number of times the compiler explores the source code. Compilers help with this.…
Q: C++ Lexicographical Sorting Given a file of unsorted words with mixed case: read the entries in the…
A: Introduction : Algorithm: 1. Open the file of unsorted words with mixed case 2. Read the entries in…
Q: Question 13 Which of the following about enhanced entity relationship modeling is/are correct?…
A: Question 13 When subtypes are overlapping, an additional field must be added to the supertype to…
Q: On the Raspberry Pi platform, what is the processor used on the board? Select one: O a. Parallax…
A: Dear learner, hope you are doing well, I will try my best to answer this question. Acc. to our…
Q: The connection between the central processing unit and the memory might be either a synchronous or…
A: Should the CPU and memory be connected via an asynchronous or synchronous bus? Which one performs…
Q: Problem 1: Designing Context-Free Grammar Let E₁ = {0, 1, 2, # } and Σ₂ = {a,b}. Consider the…
A: - We are solving problems for forming context free grammars for the language provided. - Both…
Q: Data collision occurs when many senders attempt to access the same medium at the same time; what…
A: Explanation: Data conflict Data collision is the simultaneous transmission of data packets from one…
Q: ere, NFA's to DF
A: While converting NFA to DFA, whenever there is a combination of states, create a new combined state…
Q: The directory is organized logically to obtain efficiency and convenient to the users, list three…
A: - We need to talk about three organisations structure and also the best one among them.
Step by step
Solved in 5 steps with 5 images
- When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)A parking garage charges a $2.00 minimum fee to park for up to three hours andan additional $0.50 per hour for each hour or part thereof over three hours. Themaximum charge for any given 24-hour period is $10.00. Assume that no car parksfor longer than 24 hours at a time. Write a program that will calculate and print theparking charges for each of three customers who parked their cars in this garageyesterday. You should enter the hours parked for each customer. Your programshould print the results in the below format, and should calculate and print thetotal of yesterday's receipts. The program should use the functioncalculateCharges to determine the charge for each customer.A parking garage charges a $20.00 minimum fee to park for up to three hours. The garage charges an additional $5.00 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 24- hour period is $50.00. Assume that no car parks for longer than 24 hours at a time. Write a program that calculates and printsthe parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format: Car Hours Charge1 1.5 20.002 4.0…
- The monthly payment for a givenloan pays the principal and the interest. The monthly interest is computed by multiplyingthe monthly interest rate and the balance (the remaining principal). The principalpaid for the month is therefore the monthly payment minus the monthly interest.Write a program that lets the user enter the loan amount, number of years, and interestrate then displays the amortization schedule for the loan. Here is a sample run: Loan Amount: 10000 ↵EnterNumber of Years: 1 ↵EnterAnnual Interest Rate: 7 ↵EnterMonthly Payment: 865.26Total Payment: 10383.21Payment# Interest Principal Balance1 58.33 806.93 9193.072 53.62 811.64 8381.43...11 10.00 855.26 860.2712 5.01 860.25 0.01A 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 a program that calculates and prints the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your outputs should appear in the following format Sample output Enter the hours parked for 3 cars: 1.5 4.0 24.0 Car Hours Charge 1 1.5 2.00 2 4.0 2.50 3 24.0 10.00 TOTAL 29.5 14.50You arrive in front of a bridge that you must cross to reach a village before dark. Crossing the bridge is not free - the bridgekeeper asks you to roll two dice to determine the cost. You decide to write a program to verify that he is charging the right price. Your program should read two integers, between 1 and 6, representing the values of each die. If the sum is greater than or equal to 10, then you must pay a special fee (36 coins). Otherwise, you pay twice the sum of the values of the two dice. Your program must then display the text "Special tax" or "Regular tax" followed by the amount you have to pay on the next line.
- A parking garage charges a $2.00 minimum fee to park for up to three hours and an additional $1 per hour for each hour or part thereof over four 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 a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format, and should calculate and print the total of yesterday's receipts. The program should use the function calculate Charges to determine the charge for each customer.A company of 20 employees wants to find the employee who made the highest commission so he/she can be paid a 10% bonus of the commission he/she earned for that month. The commission an employee makes is calculated by multiplying the sales amount by the commission rate. The commission rates are shown below: Sales Amount Commission Less Than 40000 No commission 40000 to 80000 inclusive 5% Greater than 80000 10% Write a program to: Prompt the user for each employee’s id (an integer value) and the sales amount For each employee, display the commission earned Display the total commission earned by all the employees Display the average commission earned by an employee Display the employee id, the commission and the bonus paid to the employee with the highest commission Must be written in c++, no arrays to be used, only use iostream libraryIn C++ A carpet company has determined that every 50 square feet of floor coverage will require 6 hours of labor. The company charges $30 per hour for labor. The program should ask for the number of rooms to be carpeted and the price of the carpet per square foot. Write a program uses this method to calculate the total cost: int getArea ( ) should ask for the square feet of floor space in each room, validate it, and return it the value main. This function should be called by main once for each one of the rooms. Display the area to be carpeted, the cost of the carpet, and the cost of labor, and the total cost to the customer. Input Validation: Do not accept a negative value for any data element.
- The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay of their employees. The user will enter an employee’s first name, last name, the hourly rate of pay, and the number of hours worked for the week. In addition, Annan Supermarkets would like the program to compute the employee’s net pay and overtime pay. Overtime hours, any hours over 40, are paid at 1.5 the regular hourlyrate. Net pay is gross pay minus taxes (Refer to the tax table on the second page).Define a class called Employee. The class must have private attributes to store the employee's name, hourly rate, and regular (≤ 40) and overtime hours worked. The class must also have methods to perform the following tasks:• A constructor to initialize the hourly rate to the minimum wage of $7.25 per hourand the hours worked (regular and overtime) to 0.0.• A method to get (a setter/mutator method)⬧ the employee's name⬧ the hourly rate⬧ the hours work for the month (by the week – assume 4…Write a program that computes and displays the charges for a patient’s hospital stay. First, the program should ask if the patient was admitted as an in-patient or an out-patient. If the patient was an in-patient the following data should be entered: • The number of days spent in the hospital• The daily rate• Charges for hospital services (lab tests, etc.)• Hospital medication charges.If the patient was an out-patient the following data should be entered:• Charges for hospital services (lab tests, etc.)• Hospital medication charges.Use a single, separate function to validate that no input is less than zero. If it is, it should be re-entered before being returned.Once the required data has been input and validated, the program should use two overloaded functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data. Both functions should return the total charges.The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay of their employees. The user will enter an employee’s first name, last name, the hourly rate of pay, and the number of hours worked for the week. In addition, Annan Supermarkets would like the program to compute the employee’s net pay and overtime pay. Overtime hours, any hours over 40, are paid at 1.5 the regular hourly rate. Net pay is gross pay minus taxes (Refer to the tax table on the second page). Define a class called Employee. The class must have private attributes to store the employee's name, hourly rate, and regular (≤ 40) and overtime hours worked. The class must also have methods to perform the following tasks: A constructor to initialize the hourly rate to the minimum wage of $7.25 per hour and the hours worked (regular and overtime) to 0.0. A method to get (a setter/mutator method)⬧ the employee's name⬧ the hourly rate⬧ the hours work for the month (by the week –…