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 (12th Edition)
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)
- The following is a sample report from a child clinic. It shows the days and treatments for visits to doctors at the clinic. A mother takes her child, sees a doctor and the doctor administers some treatment. There are couple of things you should assume: The mother’s name is unique. a mother won't have more than one child with the same name the doctor's surname is unique a treatment code is unique treatments are specific to doctors, eg 101 is only ever given by Johnson Surname First Name Town Age Child Doctor Date Treatment Smith Jane Coventry 30 Rebecca Johnson 27.3.04 101 Brian Clarence 30.5.04 209 Robert Johnson 10.1.88 101 Brown Beryl Rugby 28 Alan Clarence 30.4.04 214 Sarah Johnson 29.5.04 101 Sarah Clarence 12.1.04 321 Jones Fiona Kenilworth 34 James Clarence 30.4.04 322 Jenny…arrow_forwardYou are tasked with writing a C++ program that simulates a simple library system. The program should allow users to check out and return books, display available books, and keep track of late returns. Here are the specific program details: The program should start with an initial list of at least 10 books in the library, each with a unique identifier, title, and availability status. * Allow the user to check out a book by entering the book's identifier. • If the book is available, mark it as checked out and display a due date (assume a 14-day checkout period). * If the book is already checked out, inform the user. Allow the user to return a book by entering the book's identifier. If the book is returned on time, update the availability status. * If the book is returned late, display a message indicating a late return and calculate the late fee (assume a fee of $0.50 per day). Provide an option to display the current list of available books in the library. Please write a C++ program…arrow_forwardWrite a C++ program for a recruitment agency. The program takes candidates personal , educational and work experience data, and selects candidates for the related job category interview based on the following criteria.1- Analyst and Management Job CategoryCandidate Qualification = Masters or DoctorateCandidate Experience Candidate age Offered salary= 10 Years or above = 35 to 55= 1500 OMR2- Programmer and Technical Support Job CategoryCandidate Qualification = BachelorsCandidate Experience Candidate age Offered Salary= 2 Years or above = 24 to 35= 1000 OMR3- Technicians and AssistantsCandidate Qualification = Diploma In Partnership withCandidate ExperienceCandidate ageOffered SalaryYou need to consider the following exceptions for candidate’s qualification, Salary expectations and candidate’s age.1- If Qualification = Bachelor and Experience is 15 Years or above, then candidate is eligible for the higher category job as well i.e., Analyst and Management Job Category, If Qualification =…arrow_forward
- Use C++ Language Create a program that will determine if a student needs to take a final exam. This decision depends on the course grade average and the student’s attendance. Use the flow chart below for the final exam criteria.arrow_forwardThis final project is aimed at examining the comprehension of the student of the material covered during the semester. The objective is to allow the student to exercise his/her ability in writing effective code using C++ or Java Programming Language. The program has to evaluate arithmetic expressions using a BST for that purpose. The rules are the following: The program asks the user to enter an arithmetic expression in the infix format. Then the program builds a BST for that expression. After building the BST, a menu will be present to the user allowing him to: • traverse the BST in inorder, traverse the BST in postorder, • traverse the BST in preorder. Users will choose among the options present. The result will be the display of the original arithmetic expression and the new one that depends on the option chosen. The program should repeat as long as the user wants. Hello, i need a full c++ code for building a BST for an arithmetic expression, and to have the a menu which the user…arrow_forwardWrite algorithms to solve the problems given in each exercise. Note that you are NOT writing C++ code for this assignment. Please do not submit any code. Tom and Jerry opened a new lawn service. They provide three types of services: mowing, fertilizing, and planting trees. The cost of mowing is $35.00 per 5,000 square yards, fertilizing is $30.00 per application, and planting a tree is $50.00. Write an algorithm that prompts the user to enter the area of the lawn, the number of fertilizing applications, and the number of trees to be planted. The algorithm then determines the billing amount. (Assume that the user orders all three services.)arrow_forward
- Create a Simple Library Management Program in C Programming without using Functions Instructions:A library have Books. These Books can be issued to students or teachers. There are few characteristics of books, like its Name, its Author, Edition, IBAN, Publisher etc. In this project a book can be identified by its IBAN number. You have to store its publishing year, its edition number, price and quantity of book library having. There are characteristics of Students. Its RollNumber (Numeric Only) its gender and age. You have to make menu based program with which you will be able to Issue a book to a student. In this case Count of available quantity of that specific book must be decremented. Make Sure that in any case Library must have at least one book available. Means if library have 4 copies of a book, only 3 of them can be issued to students. Student can return a book. In this case Count of available quantity of that specific book must be Incremented. Display All details of the…arrow_forwardYou are working as a teaching assistant at a local university, you gave your students a mathematics exam. The test result appears in as shown in table (1) below. The head of the department asked to write the code that accomplishes the following three tasks using Matlab: Table (1): show the test result for a mathematics exam Number of 1 2 3 4 5 8 9. student Grades 35 50 70 63 66 90 30 27 89 aUniversity 1. Draw the flowchart for the previously requested tasks and the two that follow. 2. The number of students who got greater than or equal to 50. 3. If the mark is greater than or equal to 50, then the output is “pass" otherwise the output is "fail" 4. The number of even marks and the number of odd marks.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_forward
- IN 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_forwardObject Oriented Programming in C++ Q. . Pakistan Cricket Board (PCB) is looking for a solution to record the information about their different types of players. Under the contract of PCB there are three (3) different type of players. Suppose you are asked to develop a system, which input all the data of player and calculate & print the total scores and income of a cricket player of Pakistan cricket team. Each player is identified by name, CNIC, income and score. There are three types of players – Test, OneDay, T20. A player can be in all types but If player is not playing in any one or more types then you will input zero(0) for the data members of that class. Each type of Player gets paid using a different formula. OneDay Players are paid by their Monthly fixed salary of Rs.100,000/- per month, test players are paid by the number of hours they played at rate of Rs.2000/- per hour, while T20 players are being played by the number of matches they have played at the rate of 50000/-…arrow_forwardWRITE A C++ CODE FOR GIVEN SENIROE QUIZ GAME In a quiz game, questions are chosen in such a way that they cover all fields of a typical quiz contest. The user’s general knowledge is tested with quiz questions regarding science, technology, movies, sports, general health, geography, and many more. Quiz Game Project Introduction: Functions of projects and below is some function used in the project:- Edit score--adds the score upon giving the right answer to a question· Help-- menu with game summary and rules· Show record--shows the highest cash prize won by a particular user· Show score--to view the highest score· Reset score--to reset the highest score/ default In a quiz game project, we can store the user’s name, view the highest scoresecured by a user, and even reset the score. The game will have 50 questions have a time limit of 40 mins. For eachquestion, there are 4 options A, B, C, and D, and no negative markings. Somoney would be deducted for wrong answers to the questions.…arrow_forward
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning