Write a program that calculates the take-home pay for an employee. The two types of employees are salaried and hourly. Allow the user to input the employee first and last name, id, and type. If an employee is salaried, allow the user to input the salary amount. If an employee is hourly, allow the user to input the hourly rate and the number of hours clocked for the week. For hourly employees, overtime is paid for hours over 40 at a rate of 1.5 of the base rate. For all employees’ take home pay, federal tax of 18% is deducted. A retirement contribution of 10% and a Social Security tax rate of 6% should also be deducted. Use appropriate constants. Design an object-oriented solution. Create a second class to test your design.
A college offers a course that prepares students for the state licensing exam for real estate brokers. Last year, ten of the students who completed this course took the exam. The college wants to know how well its students did on the exam. You have been asked to write a program to summarize the results. You have been given a list of these 10 students. Next to each name is written a 1 if the student passed the exam or a 2 if the student failed. Your program should analyze the results of the exam as follows: Input each test result (i.e., a 1 or a 2). Display the prompting message "Enter result" each time the program requests another test result. Count the number of test results of each type. Display a summary of the test results indicating the number of students who passed and the number who failed. If more than eight students passed the exam, print the message "Raise tuition."
Write a C++ program to find the table of numbers using a while loop. Your program should ask the size of the table. That size defines the rows and columns.
Explain how overloading a unary operator is almost similar to overloading a binary operator with necessary examples and include main() function to demonstrate. Mention the differences between these two in terms of number of operands they deal with.
Explain how overloading a unary operator is almost similar to overloading a binary operator with necessary examples and include main() function to demonstrate. Mention the differences between these two in terms of number of operands they deal with.
Create a constructor that accepts the student number, test result, assignment result and the exam result as parameters and create get methods for the variables (UseJOptionePane to get variable from the user).
There is a Ground class that keeps the ground name and city. There is another class Game, that holds information on game names and the date of the game on which the game will be played. The Player class keeps the information about a Player, name, and code. There is a Team class that holds the team name and the total number of players counted.
In a cricket game, a team can have 11 players including 1 captain. The Game will be played between 2 teams on the ground. No player can play the game without a team on the ground. And no game can be played without a ground’s information.
Design it using any possible type of Inheritance. Input information for a game of 2 teams, and display the following:
Ground name City Game Team1 Team2 Captain1 Captain2.
Design a program using a console application in java NetBeans, named studentMarksReport that will print the final result obtained by a student with the weighting of each module. Make use of a class named Student that contains variables to store the student number, test result, assignment result and exam.
The architects of the single-cycle computer in this lesson have come to the conclusion that the two commands jal and jr can be merged. This command is as follows:
jalr $t0,$t1 # $t0 = PC + 4, PC = $t1
Change the control unit and data path of the single-cycle processor to execute the "jalr" command. What kind of instructions do you think this is?
generalize The control unit and data path of the single-cycle processor we have designed (Figure 4.24 page 271 of the book computer organization and design) to implement the following instructions
addm $t0,24($t1) # $t0 = $t0 + Mem(24 + $t1), PC=PC+4 ($t0:Rt, $t1:Rs)