Question

A program requires an if statement that tests whether an employee's hireType is either "hourly" or...

A program requires an if statement that tests whether an employee's hireType is either "hourly" or " part-time". Write this if statement in our author's pseudocode, applying the appropriate logical operator, and given the information that there are more part-time employees than hourly ones.

Homework Answers

Answer #1

// Pseudocode to check the hireType of an employee

// Assuming that there is an employee class with data field hireType and function getHireType() that returns the employee's hireType "hourly" or " part-time"

// Let emp be an instance of employee class

// check if employee's hireType is hourly , then perform the steps needed for hourly employees
if emp.getHireType() == "hourly" then
   print "Hourly";
   // do the operation required if the employee is hourly
else // if employee hireType is "part-time", then perform the steps needed for part-time employees
   print "Part-time";
   // do the operation required if the employee is hourly
end if;  

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question....
SHORT ANSWER. Write the word or phrase that best completes each statement or answers the question. Assume that a simple random sample has been selected from a normally distributed population and test the given claim. Use either the traditional method or P-value method as indicated. Identify the null and alternative hypotheses, test statistic, critical value(s) or P-value (or range of P-values) as appropriate, and state the final conclusion that addresses the original claim In tests of a computer component, it...
Use a few sentences to describe the problem given below . Also, Identify the nouns and...
Use a few sentences to describe the problem given below . Also, Identify the nouns and verbs used in the below project descriptions.  Identified nouns, list the ones that are necessary to define variables in your program. For each variable, specify its name, data type, and what information it is used to store. Write the pseudo code algorithm (i.e. algorithm steps) to solve this problem. (For the base salaries and commission rates use constants instead to keep these values. Use the...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in...
Part A. Input Validation (Name your C program yourLastName_yourFirstName_Lab4a.c) 1. Place the code you developed in Lab 2 to obtain a diameter value from the user and compute the volume of a sphere (we assumed that to be the shape of a balloon) in a new program, and implement the following restriction on the user’s input: the user should enter a value for the diameter which is at least 8 inches but not larger than 60 inches. Using an if-else...
1. Which would not be considered a part of an effective animal breeding program? Providing optimum...
1. Which would not be considered a part of an effective animal breeding program? Providing optimum feed for the desired outcome (growth, milk) Selection for specific traits for that breed Selecting the appropriate sire or dam Targeting the right market Selection for mating based on a good feeling for the animal 2. A decrease in generation interval usually causes? A decrease in accuracy of selection An increase in collected records A decrease in the rate of genetic change An increase...
Program Behavior Each time your program is run, it will prompt the user to enter the...
Program Behavior Each time your program is run, it will prompt the user to enter the name of an input file to analyze. It will then read and analyze the contents of the input file, then print the results. Here is a sample run of the program. User input is shown in red. Let's analyze some text! Enter file name: sample.txt Number of lines: 21 Number of words: 184 Number of long words: 49 Number of sentences: 14 Number of...
For the following experiments/questions, pick the most appropriate statistical test. You have the following statistical tests...
For the following experiments/questions, pick the most appropriate statistical test. You have the following statistical tests as choices: some may be used more than once, others not at all.  Assume homogeneity of variance (where applicable) and the validity of parametric tests (where applicable), unless something is directly stated (e.g., “the data are not at all normal”) or otherwise indicated (viz., by the inspection of the data) which would indicate a strong and obvious violation of an assumption. This means you must...
Question 5: Choose only one of the following hypothesis tests Seriously, you only need to do...
Question 5: Choose only one of the following hypothesis tests Seriously, you only need to do #5a or #5b. Do not do both. 5a. Let’s go back to the information about the age of the mothers of the students at the time of their births. Suppose we conduct a hypothesis test of whether the sample data provide strong evidence that the population mean mother’s age is less than 30 years. a. What are the observational units in this study? b....
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using...
Please do it in Python Write the simplest program that will demonstrate iteration vs recursion using the following guidelines - Write two primary helper functions - one iterative (IsArrayPrimeIter) and one recursive (IsArrayPrimeRecur) - each of which Take the array and its size as input params and return a bool. Print out a message "Entering <function_name>" as the first statement of each function. Perform the code to test whether every element of the array is a Prime number. Print out...
The percent of fat calories that a person in America consumes each day is normally distributed...
The percent of fat calories that a person in America consumes each day is normally distributed with a mean of about   45   and a standard deviation of   7.5 . Suppose that one individual is randomly chosen. Let   X=   percent of fat calories. In each appropriate box you are to enter either a rational number in "p/q" format or a decimal value accurate to the nearest   0.01 . (.25)   X∼    (pick one) UBNE   (    ,    ) . (.25) The probability that a person consumes...
Write a Python 3 program called “parse.py” using the template for a Python program that we...
Write a Python 3 program called “parse.py” using the template for a Python program that we covered in this module. Note: Use this mod7.txt input file. Name your output file “output.txt”. Build your program using a main function and at least one other function. Give your input and output file names as command line arguments. Your program will read the input file, and will output the following information to the output file as well as printing it to the screen:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT