2. Using an iflelse construct, write a program that will calculate a person's pay based on the number of hours worked. Take note of the following: • The pay rate is Php 35.00 per hour. Any hours worked after 40 hours is paid at the rate of 1.5 times the normal hourly rate. Calculate and display the normal pay, the overtime pay, and the total pay. • You may test your program using the following test data for the number of hours worked: 35 40 50 Compile and run the program using a different test data and save the program as WorkPay
Q: What does it signify when people complain about being stuck in traffic? Discuss TCP congestion…
A: TCP Congestion Control procedures forestall clog or assist with alleviating the blockage after it…
Q: Ex. Calculate the PA for the follow assembly code which is assume the DS = 4500h, SS = 2000h, BX =…
A:
Q: public class Appliance { public int getVoltage() { return 10; } Appliance.java public interface…
A:
Q: Explain the following paragraph (the 8086 mic
A: Q4 Explain the following paragraph (the 8086 microprocessor works only with 64KB, in the same time…
Q: what the term "salt" implies in the context of cryptography You should talk about how passwords are…
A: Introduction: Cryptography is the process of converting data into scrambled code that can be decoded…
Q: Computer science Why are mobile systems becoming more important?
A: Introduction: Because it is a phone that can be used while moving and can access a cellular phone…
Q: 04) Show in detail steps how the following numbers will be inserted to a heap, assuming it is…
A: Find the required heap with steps given as below :
Q: You've been hired to create a hospital patient control program, and you've been given all of the…
A: Software : Software Requirements Specification (SRS) A programme system requirements specification…
Q: One may wonder how a distributed denial-of-service assault could be coordinated by a single person.
A: DENIAL OF SERVICE ASSAULT DISTRIBUTED: DDoS attacks are a deliberate attempts to interrupt the…
Q: When it comes to battery use, is an OLED or LCD display better? Give reasons for your conclusions.
A: OLED panels are also well recognized for its ability: To assist devices preserve battery life by…
Q: Are there any applications where a dot-matrix printer is more suited than another form of printer,…
A: A Dot Matrix Printer is the oldest type of printer and one of the good examples of computer printer…
Q: 22,Find the brands of type Audi
A: Answer: Note: As per guideline we are not allowed to answer multiple questions in one answer so I…
Q: Professionalism is defined as: What can you tell us about its significance in the field of…
A: Professionalism:Define professional as a member of a profession or someone who makes a livelihood…
Q: What is the difference between the seekg and seekp functions?
A: Intro Both seekg() and seekp() are File Handling in C++ methods, and they are highly significant and…
Q: Discuss who owns and why they possess electronic mail networks.
A: Intro Discuss who owns and why they possess electronic mail networks.
Q: Write a command to modify the permissions of all the files and directories in the XYZ directory…
A: Let's see the solution in the next steps
Q: Preparing feasibility studies, which include technical, economic, legal, operational, and schedule…
A: Introduction: SDLC is a systematic approach for developing software packages that ensures the…
Q: Given a heap with more than ten nodes, which of the following statements is wrong? O a. None of the…
A:
Q: The UNIX kernel plays a critical function. Explain why this is the case and how it differs from…
A: INTRODUCTION: Here we need to tell The UNIX kernel plays a critical function. Explain why this is…
Q: B3. Convert-103.125 to IEEE floating point format.
A:
Q: oud computing affecting colla
A: Introduction: Cloud Computing Affecting Collaboration
Q: A binary tree is a rooted tree in which each node has at most two children. Show that in any binary…
A: The question is: A binary tree is a rooted tree in which each node has at most two children. Show…
Q: Computer science WHAT ARE THE BENEFITS OF USING CRYPTOCURRENCY PRACTICALLY?
A: Introduction: Cryptography is a means of securing communication in the presence of malicious third…
Q: Peer-to-peer sharing may be blocked by an intrusion detection or intrusion prevention system. Is…
A: Definition: Unwanted access through peer-to-peer sharing may be blocked using an intrusion detection…
Q: Describe the three types of computer programmes listed below, as well as their performance…
A: Introduction: A real-time application (RTA) is a software programme that operates in a time period…
Q: Write a Python program that will ask a user for a number, then determine whether it is odd or even.…
A: Even numbers are those numbers that are completely divisible by 2. Odd numbers are those numbers…
Q: What are the three main differences between TCP and UDP?
A:
Q: Implementation with Results(Using Prolog) (Magic Square Problem)
A: The magic square is a square matrix, whose order is odd and where the sum of the elements for each…
Q: Examine how inheritance encourages software reuse, saves time during programme development, and…
A: Introduction: Inheritance enables developers to build subclasses that reuse code that has previously…
Q: In the next ten years, what key computer hardware breakthroughs do you expect to see, and why do you…
A: Definition: Computer hardware is a collection of physical computer components. Among them are the…
Q: Compare and contrast the technical and business aspects of cloud computing with utilities
A: The question is to Compare and contrast the technical and business aspects of cloud computing with…
Q: Given array A = [145, 251, 283, 960, 350, 231, 520, 152, 412, 280]. Do the following tasks. %3D a.…
A: Answer is given below-
Q: Consider this Preference Voting Table from 50 voters and 4 candidates Rank / Number of 19 14 10 7.…
A: Find the answer with reason given as below : As per company guidelines we are supposed to answer…
Q: What are the distinctions between a type 1 and a type 2 hypervisor?
A: Distinction between type 1 and type 2 Hypervisor
Q: What is congestion management in a computer network, and why is it important? Define end-to-end…
A: Computer Network: Computer networking is the sharing of data and resources between networked…
Q: What role does the kernel mode play in computer operating systems?
A: Answer:
Q: Computer science How does exploratory testing differ from other testing techniques?
A: Introduction: Exploratory testing is a method of dealing with software testing that is commonly…
Q: When do we use the split-by clause and what does it mean?
A: Introduction: The split-by clause is used to specify which section of the list will be used to…
Q: Man-in-the-middle (MITM) attacks: how can they be avoided? Present your answer in stages.
A: Man-in-the-middle (MITM) attacks: Using caution while connecting to WIFI networks that are not…
Q: Computer science Discuss the link between information hiding as a property of successful modularity…
A: Introduction: The concept of functional dependencies arose as a result of modularity and the concept…
Q: So, what's the big deal with data encryption anyway?
A: Data encryption: The process of converting plaintext data into ciphertext is known as data…
Q: First, we need to grasp what RAID 5 is. Is there a case in which RAID 5 is superior than other…
A: What is RAID 5 : RAID 5 is a redundant array of independent disks configuration that uses disk…
Q: Explain briefly the apps that DHL uses for continuous improvement. Please specify which of the SLC…
A: System Life-Cycle(SLC): The methodology oversees all aspects of the framework, including, but not…
Q: 3. Write a C program containing a recursive function that will get the whole number quetient result…
A: Find the required code in C given as below and output :
Q: Write an efficient program that allows a user to input a set of activities, along with the starting…
A:
Q: At this moment, it is not clear how much of an influence cloud computing has had on cooperation.
A: Cloud based infrastructure has gained a lot popularity recently.
Q: ork congestion and improve network performance, write a succinct report highlighting the five most…
A: Introduction: Below the a succinct report highlighting the five most critical issues to evaluate.
Q: Were there any steps that you think are important to keep your data safe? if both data integrity and…
A: The process of preventing unauthorized access to and corruption of data at every stage of its…
Q: When it comes to the term "embedded system," what is it? In what ways does it differ from a standard…
A: We need to discuss embedded system and how does it differ from a standard computer.
Q: Identify four types of security threats.
A: Intro The Four Primary Types of Network Threats Unstructured threats. Structured threats.…
C++ language
Step by step
Solved in 3 steps with 1 images
- Java - Programming Develop a letter-guessing game in this assignment.Requirements:1). When the game begins, generate a random letter between A and Z;2). Display a message "I have a secret letter (A to Z), can you guess what it is?";3). Read the user's answer;4). Compare the user's answer and the random secret letter generated;5). If the user answer is before the random secret letter in the alphabet, display "Incorrect. Trysomething later in the alphabet" and go to Step 2;6). If the user answer is after the random secret letter in the alphabet, display "Incorrect. Trysomething earlier in the alphabet." and go to Step 2;7). If the user answer is the same as the random secret letter, display "Well done. Want to playagain (y/n)?";8). Read the user's answer. If the answer is 'y', go to Step 1. If the answer is 'n', go to Step 9;9). Display "Thanks for playing the game. Goodbye!". The program stops.Run your program several times. Take screenshots. Submit your Java file with the screenshots1. Using an if/else construct, write a program that will calkulate a person's pay based on the number of hours worked. Take note of the following • The pay rate is Php 35.00 per hour. Any hours worked after 40hrs is paid at the rate of 1.5 times the normal hourly rate. Calculate and display the normal pay, the overtime pay and the total pay • You may test your program using the f test data for the number of hours worked. 35 40 50 2. Modify Work WorkPay.java by replacing the if/else construct with the switch statement. Follow same specifications as indicated above except for the file name. Name this program as Workay2.java. • You may test your program using the f test data for the number of hours worked Rely the answer in no. 1 30 35 40 45 50When 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.)
- Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 – payment * d2) / d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest = averageDailyBalance * 0.0152 Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month (interestRate). The program outputs the interest. Format your output to two decimal places.Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance = (netBalance * d1 – payment * d2) / d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: interest = averageDailyBalance * 0.0152 Instructions Write a program that accepts as input netBalance, d1, payment, d2, and interest rate per month (interestRate). The program outputs the interest. Format your output to two decimal places. Input: 100 30 50 7 9.7 Output: 856.83 Test case 2: Input: 255.76 31 55 3 12.3 output: 3080.38Question Using Java programming language write a program to manage a hotel with 24 rooms;10 rooms are Executive, with price Gh ₵ 2500.00 per night,7 rooms are Chalets, with amounts Gh ₵ 1500.00 per night7 rooms are Ordinary, with amount Gh ₵ 500.00 per night The program should allow customers to book for rooms for a number of nights, and update the number of empty rooms available for each category when a customer has paid fully and has checked-in; also update the number of empty rooms available when customer checks-out.Customers should make bookings with their first names, telephone number A customer should be prompted to know if a room is booked (meaning a another customer has booked it but has not paid fully, or has not checked-in) A customer should be prompted to know if a room is occupied (meaning a booked room has been fully paid for, or the customer has checked-in) A customer should be prompted to know if a room is available (meaning a room has neither been booked nor…
- Use your previous working Java program as a starting point (Project 3). Create another function that determines whether the customer should receive a discount. Assume your food truck gives a 10% discount on orders over $50 (the total BEFORE tax). If the order is eligible for a discount, then calculate and display the discount. If the order does not get a discount, then still display the discount, but it should be 0. Include a line before this that tells every customer that your business gives a 10% discount on all orders over $50 so they understand this part of their receipt. You will also create two classes, one for existing project two called foodTrack and another class called foodDiscount that extends foodTrack. This is project 3: //initialize program import java.util.Scanner; public class Main { finalstatic String items[]=new String[]{"FRIES","CHEESESTEAK","BISCUIT","SALADBOWL","DONUTBOX","SALESTAX"}; finalstaticfloat…An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insuranceIn this assignment, you are going to complete a program that compute gross and net payment based on hourly wage, hours worked and a couple withholdings. Implementation Details: Make sure the outputs line up on the right-hand side. Each column in the output lines up vertically. ● The program prompt the user to enter the number of hours per week. The gross pay, net pay and the deduction is computed based on the total the number of hours worked. The deductions includes Federal tax, state tax, social security, medicare. Use declare named constants and initialize them to the values below: FEDERAL_TAX_PERCENT: 10.0 STATE_TAX_PERCENT: 3 SS_PERCENT: 6.2 MEDICARE PERCENT: 1.45 PAY_PER_HOUR: 11.25 Create a class called PayCalc to compute a person's gross and net weekly pay based on their hourly wage, hours worked, and several withholdings. All statements should be defined in the main method of the class (except for declarations of constants). ● Once your program is implemented, compile and run…
- Write a program so that the user enters four items of information for each of three employees: an employee number, the employee’s compensation, the employee type, and the date of first employment. The program should store this information in three variables of type employee, and then display their contents.An Auto Insurance Program Example - Write a program to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is 500 Rs. There is a surcharge of 100 Rs if the driver is under 25 and there is an additional surcharge for accidents as can be seen below: No. of accidents Accident Surcharge 1 50 2 125 3 250 4 375 5 575 6 or more No insurance Note: Use switch cases when you check the total number of accidents.Write a program to calculate the total final marks for a subject. There are four assessment types for the subject. Below are the percentages of the marks that will be taken into account for the Total Finall Marks (refer Table 1). Table 1 : Total Finall Marks Percentages Assessment Type Original Marks Percentage taken from original marks Finalll Eexam 100 50% Quiz 50 20% Lab 50 20% Assignment 20 10% Total Final Marks 100%