Questions
(assuming all jobs are currently in queue at their first operation) and do the following 1a....

(assuming all jobs are currently in queue at their first operation) and do the following 1a. For the following set of jobs find the sequence that minimizes average completion time; 1b. For the following set of jobs find the sequence that minimizes the number of tardy jobs.

Job

Processing Time

Due Date

1

15

20

2

8

30

3

11

32

4

6

40

5

14

50

6

7

50

7

3

65

8

9

75

In: Operations Management

According to a report issued by the CDC in 2013, 66.8 % of women 40 years...

According to a report issued by the CDC in 2013, 66.8 % of women 40 years of age and over had a mammogram within the last two years. An oncologist at the CDC would like to know if there has been a change in this percentage over the last two years. A random sample of 648 women (40 and older) is taken, and each is asked the date of their last mammogram.

  • Verify that the assumptions have been satisfied to conduct a hypothesis test.
    • Random sample?  (Yes, No)
    • The variable recorded was: (Mammogram occurred in last two years, Percentage of women who have had a mammogram in the last two years, Number of mammograms received, Date of last mammogram)
    • np =  and n(1 - p) = . Both of the values are greater than 10: (False, True)

It was found that 423 women in the sample had a mammogram in the last two years. Test the appropriate hypotheses using a significance level of 0.05.

  • H0:H0:  (p, p̂) (>, <, ≠, = ) Ha:Ha:  (p̂, p) (> ≠ <)  
  • αα =    decision rule: reject H0H0 if probability ? < > ≠   αα
  • Test Statistic: z =   (Note: round the z-score to two decimal places - carry at least four decimal places throughout all of your calculations)
  • probability =   (Note: round the probability to four decimal places)
  • Decision: Reject H₀ OR Fail to reject H₀
  • Conclusion: At the 0.05 level, there (is not, is) significant evidence to conclude the percentage of women 40 or older who have had a mammogram in the last two years is (less than, different than, greater than) 66.8%.

In: Statistics and Probability

The USPS used a code named POSTNET to direct mail based on ZIP code until 2009....

The USPS used a code named POSTNET to direct mail based on ZIP code until 2009. The bar code consists of full-or half-bars as shown below. Your code will be using a 1 for a full bar and 0 for half bar. The bar code above would then be encoded as: 110100101000101011000010011. The first and last digits of the bar code are always 1. Removing these leaves 25 digits or a 5-digit ZIP code. For the code above the digits are encoded as follows: 10100 10100 01010 11000 01001. Each decimal digit is encoded as 5 bars (2 full, 3 half)such that each digit corresponds to a given weight as follows (left to right) 7, 4, 2, 1, 0, respectively. Multiply the corresponding value with the digit and compute the sum to get the final encoded digit for the zip code. The digit ‘0’ is special, encoded as 11000or a decimal 11, as there have to be two full bars per digit.Write a zipcodeclass that encodes and decodes five-digit bar codes used in POSTNET. The class should have two constructors. First constructor should input the zipcode as an integer and the second constructor should input the zip code as a bar code stringconsisting of 0s and 1s as described above.Although you have two ways to input the zip code, internally the class should only store the zip code using the integer formatas a private variable. The class should have at least two public member functions: one to return the zip code as an integer and the other to return it as a string. Any other helper functions should be declared as private.Test all code functionality(think of cases that may break it and include safeguards to protect against them, e.g.:if the length is incorrect, start/end digitis incorrect, etc).Discuss your code if you have any additions or have taken into account these special cases (add this as comments). Show the output of your code for the following two cases: 23456 and “110100110000010100011110001”.

In: Computer Science

8) Last week, Onboard Co. has announced that the next two annual dividends will be in...

8) Last week, Onboard Co. has announced that the next two annual dividends will be in the amount of $2.28 and $4.21, respectively. After that, the dividends will increase by 2.93 percent annually. The required return on this stock is 10.35 percent. What is the current price per share? (Hint: draw this out on a timeline.)

In: Finance

This is in Python: Alter your code for previous Do It Now problem, with the change...

This is in Python:

Alter your code for previous Do It Now problem, with the change that the row should only be printed by the second number that the user enters. For example, the user enters two numbers of 5 and 7 for the two input lines in the code, and the following will be printed:

5 x 1 = 5

5 x 2 = 10

5 x 3 = 15

5 x 4 = 20

5 x 5 = 25

5 x 6 = 30

5 x 7 = 35

*Previous Code that question refers to!*

Write a code to ask a number (one digit) from the user and prints the respective row of the multiplication table. For example, if the user enters 5, the following lines will be printed. Note that, if the user enters any number outside the range of 1-9, the program should display an error message.

5 x 1 = 5

5 x 2 = 10

5 x 3 = 15

5 x 4 = 20

5 x 5 = 25

5 x 6 = 30

5 x 7 = 35

5 x 8 = 40

5 x 9 = 45

5 x 10 = 50

num = int(input('Please enter the number : '));

while(num<1 or num>9):

num = int(input('Incorrect value entered, please re-enter : '));

for i in range(1,10):

print(num,' x ',i,' = ',num*i);

In: Computer Science

in java language Write a method called findNums that takes a two-dimension array of integers and...

in java language

Write a method called findNums that takes a two-dimension array of integers and an int as parameters and returns the number of times the integer parameter appears in the array. For example, if the array (as created by the program below) is

10 45 3 8

2 42

3 21 44

And the integer parameter is 3, the value returned would be 2 (the number 3 appears two times in the array)

public class Question2 {

   public static void main(String args[]){

     int arr[][] = {{10, 45, 3, 8}, {2, 42}, {3, 21, 44}};

     System.out.println(“The number time 3 appears is “+findNums(arr,3));

   } //main

In: Computer Science

A box contains 5 green marbles, 8 blue marbles, and 8 red marbles. Three marbles are...

A box contains 5 green marbles, 8 blue marbles, and 8 red marbles.

Three marbles are selected at random from the box, one at a time, without replacement.

Find the probability that the first two marbles selected are not red, and the last marble is red.

In: Statistics and Probability

Q1A 4-poles, wave wound, 600 conductors DC long shunt generator has the armature, series and shunt...

Q1A 4-poles, wave wound, 600 conductors DC long shunt generator has the armature, series and shunt resistances are 0.15 ohm, 0.18 ohm and 200 ohm respectively. It runs at 1500 rpm. Calculate the following if it is required supply to the load resistance of 20ohm with flux per pole as 8.33 mWb. Take the Iron and Frictional losses as 550 W.(i)Induced Emf(ii)Terminal Voltage(iii)Output Power(iv)Input Power(v)Efficiency

Q2Write short notes on following characteristics of dc generator(i) Open Circuit Characteristics (OCC)(ii) Load Characteristics

Q3A dc short shunt generator supply 500V to a 20 kW load. Its armature, series and shunt resistance are 0.8 , 0.6 and 700 respectively. Calculate the armature current, induced emf, input power, torque supplied by the prime mover and efficiency if its speed and mechanical losses are 1500 rpm and 910W respectively.

Q4A 500V, 4 poles, wave-wound DC Series Motor has 900 conductors on its armature. It has armature and series field resistance of 0.6, and 0.8respectively. The motor takes a current of 40A. Estimate the speed and gross Torque developed if it has a flux per pole of 20mWb.

Q5A dc shunt motor takes a no load current of 5 A at 300V. Its armature and shunt resistances are 0.45 ohm and 0.68 ohm respectively. Calculate the Constant Loss (Iron and Frictional Loss) of the machine.

Q6A dc series motor operates at 1000 rpm with a line current of 82A from 250V mains. its armature circuit resistance is 0.2and its field resistance is 0.6. Find the speed at which the motor runs at a line current of 65A, assuming that the flux at this current is 33% of the flux at 82A.

Q7A 3 phase, 50Hz, 4 poles induction motor runs at 1440 rpm. Calculate the following i.Synchronous speedii.Slipiii.Slip speediv.Rotor frequency while runningv.Rotor cu loss if mechanical power developed is 16 kW.

Q8A 40 kW (Rated Output), 415V, 50Hz, 3 phase, star connected induction motor has a synchronous speed of 1800 rpm. The full load slip is 4% and full load power factor is 0.9 lagging. Stator Cu losses are 2500 W. Iron losses are 2000W. Rotational losses are 1400 W. Calculate i.Shaft or Net Torque developedii.Mechanical power developediii.Power inputiv.Efficiencyv.Supply current

Q9The following are the equivalent circuit parameters of a 3phase, star connected 415V, 50Hz, 4 poles Induction Motor:R1= 0.5, R'2= 0.4/s , X1= 0.9, X'2= 0.8, Xm= 50,(neglect Ro)Calculate the input impedance, motor current, power input, power supplied to the rotor, power developed and efficiency if its rotational losses are 1200W. It runs at 1410 rpm.

Q10A 415-V, 29.84 kW, 50 Hz, delta-connected 3-phase induction motor gave the following test data:No load test:415V, 15A, 2000 WLocked rotor test:125V, 40A, 4000 WConstruct the circle diagram and determine the line current and power factor for the rated output. Assume stator and rotor Cu losses equal at standstill.Q11With a aid of neat circuit diagram, explain the working principle of Automatic star-delta starter of three phase induction motor

In: Electrical Engineering

For this assignment, write a program that uses functions to simulate a game of Craps. Craps...

For this assignment, write a program that uses functions to simulate a game of Craps.

Craps is a game of chance where a player (the shooter) will roll 2 six-sided dice. The sum of the dice will determine whether the player (and anyone that has placed a bet) wins immediately, loses immediately, or if the game continues.

If the sum of the first roll of the dice (known as the come-out roll) is equal to 7 or 11, the player wins immediately.

If the sum of the first roll of the dice is equal to 2, 3, or 12, the player has rolled "craps" and loses immediately.

If the sum of the first roll of the dice is equal to 4, 5, 6, 8, 9, or 10, the game will continue with the sum becoming the "point." The object of the game is now for the player to continue rolling the dice until they either roll a sum that equals the point or they roll a 7. If the player "makes their point" (ie. rolls a sum that equals the point), they win. If they roll a 7, they lose.

There are many wagers that can be made of a game of craps. For this program, we'll focus on a wager known as the pass line bet. It's a wager that the player will win the game (ie. the initial roll is 7 or 11, or the player makes their point).

This wager pays 1/1 or even money. This means that if the user wagers $1, they'll win $1 if the game is won. In other words, if the game is won, the user will win the amount that they wagered plus their original wager. So if the wager amount was $10 and the game is won, the user will win $10 plus get their original wager amount for a total of $20.

Random Number Generation

The random number generator will be used to "roll" the dice.

If a reminder is needed about how to use the random number generator and how to limit the values that are produced, refer back to program 4:

Link to Program 4

Basic Logic for int main()

Seed the random number generator with a value of 34. Note: other seed values may be used to produce different results. However, the version that is handed in for grading MUST use a seed value of 34.

Call the getWager() function that is described below to get the amount that the player wants to wager on the game. Make sure to save the value that is returned from the getWager() function in a double variable.

Call the rollTheDice() function that is described below for the come-out roll (the first roll of the dice). Make sure to save the value that is returned from the rollTheDice() function in an integer variable.

If the game is immediately won, the game is over. Display a congratulatory message and how much money the player has won. Call the winner() function that is described below to determine if the game is immediately won. Make sure to pass the integer value that was returned from the rollTheDice() function to the winner() function.

If the game is immediately lost, the game is over. Display a message indicating the player has lost because they rolled craps and how much money the player has lost. Call the craps() function that is described below to determine if the game is immediately lost. Make sure to pass the integer value that was returned from the rollTheDice() function to the craps() function.

Otherwise, the game continues. Call the rollMore() function that is described below. Make sure to pass the integer value that was returned from the rollTheDice() function and the double value that was returned from the getWager() function to the rollMore() function.

The Functions

Write and use the following 5 functions in the program.

int rollTheDice()

This function simulates the rolling of the two dice. It takes no argument. It returns an integer: the sum of the two dice rolls.

This function should roll the dice by generating two random numbers between 1 and 6. The random numbers should be added together and then displayed along with the sum. Finally, return the sum of the dice.

bool winner( int roll )

This function determines if the game of craps was immediately won on the come-out roll. It takes one integer argument: the come-out roll. It returns a boolean value: true if the game was immediately won or false if the game was not immediately won.

If the come-out roll is equal to 7 or 11, return true because the game has been won. Otherwise, return false because the game has not been won.

bool craps( int roll )

This function determines if the game of craps was immediately lost on the come-out roll. It takes one integer argument: the come-out roll. It returns a boolean value: true if the game was immediately lost or false if the game was not immediately lost.

If the come-out roll is equal to 2, 3, or 12, return true because the game has been lost. Otherwise, return false because the game has not been lost.

void rollMore( int point, double wager )

This function continues the game of craps until it is won or lost. It takes two arguments: an integer that represents the point and a double that represents the amount that the user has wagered. It returns nothing.

The function should start by displaying the point.

Create a boolean variable and initialize it to a value of true to indicate that the game should continue.

In a loop that executes as long as the game should continue:

call the rollTheDice() function to roll the dice

if the dice roll is the same as the point, display a congratulatory message indicating the player has made their point and won the game. Calculate and display how much money the player has won. Finally, change the boolean variable that controls the loop to false to indicate the game should no longer continue.

otherwise, if the dice roll is 7, display a message that the player has lost the game. Display how much money the player has lost. Finally, change the variable that controls the loop to false to indicate the game should no longer continue.

double getWager()

This function gets the player's wager amount and makes sure that it's a valid amount. It takes no arguments. It returns a double: a valid wager amount.

The function should start by prompting the player to enter their wager amount. Like at a casino, there is a minimum wager ($5). Use a loop to check the player's wager amount and get a new amount if needed.

Also like at a casino, the wager amount cannot contain cents. So a wager amount of $5.25 should not be allowed. If the user adds cents to their wager amount, "give back" the cents to the user and use the remaining amount as the wager amount. So if the user tries to wager $5.25, the $0.25 should be "given back" and the wager amount adjusted to $5.

There are a number of ways to check for cents. One way is to take the original wager amount and subtract the integer portion of the wager amount. If the difference is greater than 0.00, the player added cents to the wager amount. To "give back" the cents, display the cents that are given back and update the wager amount so it's equal to just the integer portion of the original wager amount.

Finish the function by returning the wager amount.

Symbolic Constants

The program MUST use at least three symbolic constants. Some options are:

an integer for each of the values (2, 3, and 12) that represents craps on the first roll of the die
an integer that represents the value 7
an integer that represents the value 11
Program Requirements

As with the previous assignments and the assignments until the end of the semester, complete program documentation is required. For this assignment, that means that line documentation AND function documentation boxes are needed. Make sure that main() and any function that you write contains line documentation

Each function must have a documentation box detailing:

its name
its use or purpose: that is, what does it do? What service does it provide to the code that calls it?
a list of its arguments briefly describing the meaning and use of each
the value returned (if any) or none
notes on any unusual features, assumptions, techniques, etc.
/***************************************************************
Function: void rollMore( int point, double wager )

Use: This function continues the craps game after the come-out roll

Arguments: point - an integer that represents the number that needs to
be rolled by the player to win the game

wager - a double that represents the amount the player
wagered on the game

Returns: Nothing

Note: None
***************************************************************/
See the documentation standards on the course webpage for more examples or if further clarification is needed. A program will not get full credit (even if it works correctly) if these standards are not followed

Make sure to actually use the symbolic constants that are created.

Be sure to #include <cstdlib> since the random number generator is being used in the program.

Make sure that the copy of the program that is handed in uses srand(34); to set the seed value for the random number generator.

Hand in a copy of the source code (CPP file) using Blackboard.

Output

Some runs of the program follow. Each one is marked with the srand value that produced the result.

Run 1 using srand(34); on Windows PC

What's your wager (no cents allowed) (minimum: 5.00)? 45.00

Roll: 6 + 4 = 10

The point is 10

Roll: 5 + 4 = 9
Roll: 5 + 3 = 8
Roll: 3 + 1 = 4
Roll: 5 + 1 = 6
Roll: 3 + 1 = 4
Roll: 3 + 5 = 8
Roll: 6 + 5 = 11
Roll: 1 + 2 = 3
Roll: 2 + 1 = 3
Roll: 6 + 6 = 12
Roll: 6 + 3 = 9
Roll: 4 + 2 = 6
Roll: 5 + 1 = 6
Roll: 3 + 5 = 8
Roll: 1 + 2 = 3
Roll: 6 + 3 = 9
Roll: 2 + 6 = 8
Roll: 6 + 1 = 7

Seven'd out! You lose!
You lost $45.00

In: Computer Science

Use C++ Black Jack Create a program that uses methods and allows the user to play...

Use C++

Black Jack

Create a program that uses methods and allows the user to play the game of blackjack against the computer dealer. Rules of Blackjack to remember include:

1. You need one 52 card deck of cards with cards from  2-Ace (4 cards of each number).

2. Jacks, Queens and Kings count as 10 points.

3. An Ace can be used as either 1 or 11 depending on what the user decides during the hand.

4. Draw randomly two cards for the "dealer" and display one of them while keeping the other hidden. Also, randomly draw two cards for the player and display them in view.

5. Allow the user to hit (randomly draw a card) as many times as they wish. If the player "busts" or gets over 21, the dealer automatically wins the players wager.

6. After the user "stands" or is satisfied with his total, the dealer must take a card if his total is 16 or below, and cannot take a card if his total is 17 or above.

7. If the dealer "busts" or goes over 21, the player wins back his wager plus his wager again. (Example - if a player bets $3 he gets back his original $3 plus an additional $3).

8. If neither the dealer or the player "busts" or goes over 21, then the highest total wins. Ties go to the dealer.

9. Note - the player should start with $20 in the bank and cannot wager more than he currently has in the bank.  

10.  Note - before each round the user can bet in whole dollars how much to wager or how much of the total in the bank to risk.

11. Allow the user to quit at any time. Of course, the user must quit if he/she runs out of money.

12. Remember, somehow ensure that the same card (example - 6 of spades) cannot be drawn twice in a single hand.

In: Computer Science