Suppose a small company has five employees and is planning to increase the number to six. Moreover, suppose one of the company’s programs contained the following assignment statements.
DailySalary = TotalSal/5;
AvgSalary = TotalSal/5;
DailySales = TotalSales/5;
AvgSales = TotalSales/5;
How would the task of updating the
DailySalary = TotalSal/DaysWk;
AvgSalary = TotalSal/NumEmpl;
DailySales = TotalSales/DaysWk;
AvgSales = TotalSales/NumEmpl;
Want to see the full answer?
Check out a sample textbook solutionChapter 6 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Additional Engineering Textbook Solutions
Starting Out with C++ from Control Structures to Objects (9th Edition)
Computer Systems: A Programmer's Perspective (3rd Edition)
Digital Fundamentals (11th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
C++ How to Program (10th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
- Give solution in C++ Language with secreenshoot of each step.arrow_forwardWrite a simple payroll program that will display employee’s information. Refer to the UMLClass Diagram for the names of the variable and method. This should be the sequence of theprogram upon execution:a. Prompt the user to input the name of the employee.b. Prompt the user to select between full time and part time by pressing either F (fulltime) or P (part time).c. If F is pressed, ask the user to type his monthly salary. Then, display his name andmonthly salaray.d. If P is pressed, ask the user to type his hourly rate and hours worked separated by aspace. Then display his name and wage.arrow_forwardIN C++ programming This question is inspired by the famous Uno card game. Write an activity that takes two arguments: (1) the player's current hand and (2) the current upward card on the table. Work will be back true if the player is able to make the game, or false if the player must draw on the deck. A player can make a game if: They have a card the same color as the upside card. They have the same number card as the upside card. canPlay (["yellow 3", "yellow 7", "blue 8", "red 9", "red 2"], "red 1") => trutharrow_forward
- Given the month and the year, you are required to print the Georgian Calendar' for that month. For example, the calendar for the month of September 2017 is: SM T W T FS 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 The solution to this problem can be rather complex, so we will use functional abstraction to break it down into smaller parts. You are advised to implement and test each part (by defining a suitable main function) before moving on the the next part. You are to implement the following functions: 1. bool is leap_year(int year) to determine if a given year is leap. Note that not all years which are multiples of 4 are leap. Centuries are not leap unless they are multiples of 400. 2. int days_in_month(int month, int year) that takes the month (an integer from 1 to 12) and year, and returns number of days in the given month (an integer from 1 to 31). Note that you should use the is_leap_year function to determine if February has 28 or 29 days.…arrow_forwardin python use fuctional programmingarrow_forwardIn c++. Read all instructions.arrow_forward
- Please help me write a C program code for this projectProgram for hazard games*Game design*creating a game.*Project description*:1. The game should ask the number of participants, then generate a random number which is stored in memory. The program should ask player 1 to enter a number of his choice. Then subtract that number from the number that was randomly generated by the computer. If the result of the operation is <0, player 1 loses. If the result is >= 0, the program should ask the next player to choose a number. The same operation is now performed on the number entered by player 2 which is then subtracted from the remainder after the operation carried out by player 1 and if the result is <0, player 2 loses else, the program continues until we have a winner. *Note* 1.The program should generate random numbers from 0 - 100 inclusive and the program is not supposed to display the result of the operation. 2. Each player has just one possible chance to play(i.e if player 1…arrow_forwardWe want a Java program or C++ for an online store (The idea of the program is a shoe store and the seller can display shoe products and know how much of each shoe is sold) #Each shoe has an id, type, price and color # The buyer can see the shoes, add them in the shopping cart, and determine the delivery company and the importance of the order - If the request is urgent, a value of 10 riyals will be added to it for the delivery # When the buyer goes to the shopping bag, the total price of his products is shown to him, and when he confirms the order, he must log in and specify the delivery company and the type of order. Then the final total is calculatedarrow_forwardPlease solve C++ Programming Languagearrow_forward
- IN C++ This is a simulated chess game. With this project, I want you to move all the pieces on one side of the board. First: If you are unsure how the pieces of a chess board move, do some research. There is plenty of information out there to instruct how a chessboard functions. Your chess piece movement must follow the rules of the game. Second: This is a one-sided board and used to illustrate how each piece moves. Third: The program must keep track of the location of each piece. By this I mean that if a piece is moving, it must respect the position of the other pieces on the board. Fourth: With each move the user should also be given the option to start a new game or end the program.arrow_forwardComputer Science Practice Task : Write a program in phyton language . Implement Water Jug Problem using DFS in Python, initial stage (0,0) and final stage (2,Y). A Water Jug Problem: You are given two jugs, a 4-gallon one and a 3- gallon one, a pump which has unlimited water which you can use to fill the jug, and the ground on which water may be poured. Neither jug has any measuring markings on it. How can you get exactly 2 gallons of water in the 4-gallon jug?arrow_forwardGive theory as solution like background theory, what concepts will apply in this questions and theory in c++ language. Do not give source code just give theory.arrow_forward
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning