1. Using an if/else 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 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 ff test data for the number of hours worked. 35 40 50
Q: this is the Question of object oriented programming write answer in a program Mr.Fayyaz is a…
A: UML diagram: It stands for unified modeling language .before the actual implementation of software…
Q: Write multiple if statements:If carYear is before 1967, print "Probably has few safety features."…
A: Multiple if-statement includes many if-statements. In multiple if-statement, one or more…
Q: Write a program that reads two pieces of information: the hourly wages and the number of hours…
A: Required: Write a python program to calculate the net salary based on given instructions. all the…
Q: OBJECT: To compute the net pay of an employee, given his/her pay rate, number of hours, and…
A: OBJECT: To compute the net pay of an employee, given his/her pay rate, number of hours, and…
Q: QUESTION 13 Write a Java program that prompts the user to enter the monthly salary amount of an…
A: I give the code in Java along with output and code screenshot
Q: Task 3: Write a program for a matchstick game being played between the computer and a user. Your…
A: The solution code for the above given problem is given below: - CODE: - #include<stdio.h>…
Q: Assignment 2 Q1-Write a program in java to accept a grade and declare the equivalent description:…
A: Find Your Code Below
Q: Write a program to help Buddy (the sheepdog) calculate the average age of all his sheep. The program…
A: Java is first published in 1995 by sun microsystems as a programming language and computing…
Q: CHALLENGE 1.2.3: Read multiple user inputs. ACTIVITY Write two cin statements to get input values…
A: #include <iostream> using namespace std; int main(){ int birthMonth; int birthYear;…
Q: Problem 1. Vehicles Write a program that models 2 vehicles (Car and Truck) and will be able to…
A: This is an object-oriented programming concept in which concepts like inheritance, polymorphism are…
Q: Write a program that prints your complete name on the first line and course, year and section on…
A: PFB the asked program: import java.io.*; class GFG { public static void main (String[] args) {…
Q: PROBLEM STATEMENT: Return the factorial of the provided integer parameter. public class…
A: Return the factorial of the provided integer parameter. public class FactorialComputation{public…
Q: Create a simple illness Check-up Java program. This program must implement encapsulation and…
A: Encapsulation : Encapsulation is wrapping up of data and function under a single unit. It is the…
Q: Write an Oject Oriented Program using java to compare the risk factor that will lead to high payment…
A: Java Code import java.util.*; class Main { public static void main (String[] args) { Scanner Sc =…
Q: In JAVA To set input the value employees , salary through using parameterized constructor . To…
A: /* package codechef; // don't place package name! */ import java.util.*;import java.lang.*;import…
Q: Write a program that computes the cost of painting and installing carpet in a room. Assume that the…
A: In this question, we will create a class ROOM to store the properties of the room and to calculate…
Q: Create a java program that will ask the weight (kg) and height (cm) of the user, the program will…
A: BMI calculation : formula : weight / height * height logic: BMI >= 30 means…
Q: Direction: Create a simple Java Program that will output the grades of 1 student in different…
A: Find Your Answer Below
Q: Task 2: Here, we will use the printf statement to display text in the terminal (like we did in the…
A: Approach: Include necessary standard input and output header files in the main function ,write a…
Q: Use your previous working Java program as a starting point (Project 3). Create another function that…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Write a Q. BASIC program that reads and outputs the weather status average using Nested IF…
A: I have implemented the following requirements with comments for better understanding of the code. I…
Q: Write a program that asks for the borrower's lastname, borrower's first name, borrower's middle…
A: According to the question there is no specific programming language mentioned. We have solved the…
Q: Write multiple if statements: If carYear is before 1967, print "Probably has few safety features."…
A: According to the information given:- We have to follow the instruction mentioned in order to get…
Q: Write a program that calculates the total cost of airplane tickets according to the following table:…
A: Note: As you have not mentioned the language of the program. The below code is given in CPP…
Q: write java program that prompt the student to enter an integer number(between 1 till 5 inclusive)…
A: Code :-…
Q: The Body Mass Index – BMI is a parameter used to measure the health status of an individual. Various…
A: Start Variables name with type string and weight, height as type double Define constructor BMI…
Q: Consider a bank named ABC. Create some customers (minimum 10) of that bank. Each customer has a…
A:
Q: Write and test a well commented program which helps an insurance broker determine insurance premiums…
A: Actually, program is an executable software that runs on a computer.
Q: In this assignment, you are going to complete a program that compute gross and net payment based on…
A: code in java : ======================================================== import java.util.*;import…
Q: de to show a dialog box which says “Wlcome to Deptartment of CSE, Leading Universit
A: I have given code to print statement in dialogBox.
Q: Write a Java program that reads student scores, displays the lowest score, and percentage of fail…
A: Comments can be utilized in java to explain its code making it more readable. Types of comments are…
Q: Write a program which takes fuel type from user. If fuel type in not in the range of 1 to 3 then it…
A: Note: The given Program is in C++ programming language
Q: Write a C++ program to calculate the area of all classrooms in your college. Most of the classrooms…
A: CODE:- #include <iostream>#include<string.h>using namespace std; int calculateArea(int…
Q: FOLLOW THE FORMAT!! Create a java program that will ask the weight (kg) and height (cm) of the user,…
A: BMI calculation : formula : weight / height * height logic: BMI >= 30 means…
Q: Exercise 4: Write a program that reads two pieces of information: the hourly wages and the number of…
A: Problem:- we need to calculate net salary of an employee based on hourly pay wage and working hour…
Q: Write a Java program code: Scenario: One of the renowned supermarket in Dhaka City, “Shwapno” is…
A: Program with comments: //custom exceptionpublic class NameException extends Exception{ //…
Q: (A) Write a Java program that reads student scores, displays the lowest score, and percentage of…
A: The Java program reads n numbers from the user. Then read n scores into the double type array. using…
Q: Write a program that calculates a weekly wage, based on an hourly payrate and how many hours were…
A: Answer:
Q: In java Problem: An online grocery store sells items on a web page. A user adds items to a basket…
A: Main.java import java.io.File; // Import the File class import java.io.FileNotFoundException; //…
Q: There are five syntax errors in the following java program. Explain them by mentioning the line…
A: public class Find Errors { public static void main(String[] args) { int a = 8;…
Q: Write a program that uses different operators; and Use the methods of the Math class. nstructions:…
A: PROGRAM EXPLANATION Create a class as given in the question. Take 5 grades as input from the user.…
Q: Write an if-else statement for the following: If userTickets is greater than 8, execute awardPoints…
A: Hey, thank you for your question. To solve this problem, we can add a small coding snippet of…
Q: Write a C++ program to calculate the area of all classrooms in your college. Most of the classrooms…
A: CODE:- #include <iostream>#include<string.h>using namespace std; int calculateArea(int…
Q: Write multiple if statements: If carYear is before 1967, print "Probably has few safety features."…
A: 1. Taking User input for the carYear variable. 2. Writing multiple if statements as per given…
Q: Using Java programming language write a program to manage a hotel with 24 rooms; 10 rooms are…
A: It is defined as
Q: In which cases you can transform an else-if statements to switch? Provide an example
A: The solution to the given problem is below.
Q: 1. Using an itjelse construct, write a program that will calculate a person's pay based on the…
A: Algorithm:1.import util package for scanner class 2.define a class named WorkPay2 3.In the main…
Q: Ql: Write a program that allows a user to enter a string containing a day of the week ('Sunday',…
A: The program is about to take a string (weekday) as an input and return an integer between 1 and 7.…
Q: Write a program that ask the user to enter his/her letter grade and then respond with an appropriate…
A: grade = input("Enter your grade : ") #taking user inputif(grade == 'a' or grade == 'A'):…
Q: Dry run the below programs and explain the reasons of output. If there is any error then correct…
A: Output: Or Note: In the output, there is a space before the string Or and after the string.
![1. Using an if/else 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 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 ff test data for the number of hours worked.
35
40
50](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F0cd1e7b3-5d06-4878-9b6a-ff1952306442%2F75f8bc89-3299-45e3-bd52-8cd408902949%2F8zrune_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- 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.38Interest 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.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.
- Interest on a credit card’s unpaid balance is calculated using the averagedaily 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) / d1If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is:interest = averageDailyBalance * 0.0152Write a program that accepts as input netBalance, payment, d1, d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.1. 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 50The interest paid on a savings account is compounded daily. This means that if you start with startbal dollars in the bank, at the end of the first day you’ll have a balance ofstartbal * (1 + rate/365)dollars, where rate is the annual interest rate (0.10 if the annual rate is 10 percent). At the end of the second day, you’ll havestartbal * (1 + rate/365) * (1 + rate/365)dollars, and at the end of n days you’ll havestartbal * (1 + rate/365)ndollars. Write a program that processes a set of data records, each of which contains values for rate, startbal, and n and computes the final account balance.
- 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. The interest on the unpaid balance is: interest = averageDailyBalance * interestRate where interestRate is the interest rate per month. Write a program that accepts as input netBalance, payment, d1, d2, and interestRate. The program outputs the interest. Format your output to two decimal places. Analyze and design this program. Write the code, compile and run it. Upload your analysis and design document and your .cpp source code file here.Scenario As you surely know, due to some astronomical reasons, years may be leap or common. The former are 366 days long, while the latter are 365 days long. Since the introduction of the Gregorian calendar (in 1582), the following rule is used to determine the kind of year: if the year number isn't divisible by four, it's a common year, otherwise, if the year number isn't divisible by 100, it's a leap year. otherwise, if the year number isn't divisible by 400, it's a common year. otherwise, it's a leap year. none of the above year int(input("enter the year")) if (year%4 1-0) and (year%400 -0) or (year % 1000): print (year is common year") else: print(year, is leap year") year= int(input ("enter the year")) if (years !-0) or (year480 1-0) and (year % 1001-0): print(year is common year") else: print(year, "is leap year") D year= int(input("enter the year"))Question 2: As a python programmer for an educational institution you are instructed to write a program to simulate the grades for 5 subject areas and display the grade for each based on the following guidelines: Take in the marks of 5 subjects from the user and store it in different variables. 2. Find the average of the marks. 3. Use an else condition to decide the grade based on the average of the marks. 4. Print the Words "Successful Grad Earned" if the student has passed, if the student has failed print the Words" Re-Take Exam" 5. Exit A. Write an algorithm to represent the steps for this program B: Write a program in python to execute the guidelines presented above C. Draw a detailed flowchart to represent the program
- In python, a) In the Hi-Lo game, the player begins with a score of 1000. The player is prompted for the number of points to risk and a second prompt asks the player to choose either High or Low. The player’s choice of either High or Low is compared to a random number between 1 and 13, inclusive. If the number is between 1 and 6 inclusive, then it is considered “low”. A number between 8 and 13 inclusive is “high”. The number 7 is neither high nor low, and the player loses the points at risk. If the player had guessed correctly, the points at risk are doubled and added to the total points. For a wrong choice, the player loses the points at risk. Create a HiLo application based on this specification. Application output should look similar to b) Modify the application to allow the player to continue until there are 0 points left. At the end of the game, display the number of guesses the user took before running out of points.Question 1 Write a payroll program that computes an employee's gross pay and net pay. An employee who works more than 40 hours per week should be paid at overtime rate (1.5 x regular rate) for all hours over 40. Compute net pay by deducting 10% of gross pay only if an employee earns more than RM1500.Interest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalanceis the balance shown in the bill, paymentis the payment made, d1is the number of days in the billing cycle, and d2is the number of days payment is made before the 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 balanceis: interest = averageDailyBalance * 0.0152 Design a program that accepts as input netBalance, payment, d1, d2, and interest rate per month. The program outputs the interest charged. Format your output to two decimal places. C++
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)