Questions
Expected demands for next 5 weeks for Plant A are given as:       Week:                    1        

Expected demands for next 5 weeks for Plant A are given as:

      Week:                    1                      2                      3                      4                      5

      Demand:               12000              7000                9500                11000              8000 (units)

      Desired capacity of Plant A is 10000 units/week. Plant manager wants that the average

      inventory must be less than 500 (units) and the average utilization of plant is above 80%.

      The beginning inventory is 2000. (8 points)

      a) Complete the following MPS with given information. (4 points)

      Week:                    1                      2                      3                      4                     5

      --------                    -------            ---------            ---------           ---------            --------

      Master Schedule: 10000              _____             10000              10000              8000

      Demand:               12000              7000                9500                11000              8000

      Ending Inventory: _____             500                  _____              0                      _____

            b) Does this schedule satisfy the manager's objective? Why?

In: Operations Management

Objective: Upon completion of this program, you should gain experience with overloading basic operators for use...

Objective: Upon completion of this program, you should gain experience with overloading basic operators for use with a C++ class.

The code for this assignment should be portable -- make sure you test with g++ on linprog.cs.fsu.edu before you submit.

Task

Create a class called Mixed. Objects of type Mixed will store and manage rational numbers in a mixed number format (integer part and a fraction part). The class, along with the required operator overloads, should be written in the files "mixed.h" and "mixed.cpp".

Details and Requirements

  1. Your class must allow for storage of rational numbers in a mixed number format. Remember that a mixed number consists of an integer part and a fraction part (like 3 1/2 -- "three and one-half"). The Mixed class must allow for both positive and negative mixed number values. A zero in the denominator of the fraction part constitutes an illegal number and should not be allowed. You should create appropriate member data in your class. All member data must be private.
  2. There should be two constructors. One constructor should take in three parameters, representing the integer part, the numerator, and the denominator (in that order), used to initialize the object. If the mixed number is to be a negative number, the negative should be passed on the first non-zero parameter, but on no others. If the data passed in is invalid (negatives not fitting the rule, or 0 denominator), then simply set the object to represent the value 0. Examples of declarations of objects:
     Mixed m1(3, 4, 5);    // sets object to 3 4/5 
     Mixed m2(-4, 1, 2);   // sets object to -4 1/2 
     Mixed m3(0, -3, 5);   // sets object to -3/5 (integer part is 0). 
     Mixed m4(-1, -2, 4);  // bad parameter combination.  Set object to 0. 
    

    The other constructor should expect a single int parameter with a default value of 0 (so that it also acts as a default constructor). This constructor allows an integer to be passed in and represented as a Mixed object. This means that there is no fractional part. Example declarations:

     Mixed m5(4);  // sets object to 4 (i.e. 4 and no fractional part). 
     Mixed m6;     // sets object to 0 (default)
    
    Note that this last constructor will act as a "conversion constructor", allowing automatic type conversions from type int to type Mixed.
  3. The Mixed class should have public member functions Evaluate(), ToFraction(), and Simplify(). The Evaluate() function should return a double, the others don't return anything. These functions have no parameters. The names must match the ones here exactly. They should do the following:
    • The Evaluate function should return the decimal equivalent of the mixed number.
    • The Simplify function should simplify the mixed number representation to lowest terms. This means that the fraction part should be reduced to lowest terms, and the fraction part should not be an improper fraction (i.e. disregarding any negative signs, the numerator is smaller than the denominator).
    • The ToFraction function should convert the mixed number into fraction form. (This means that the integer part is zero, and the fraction portion may be an improper fraction).
  4. Create an overload of the extraction operator >> for reading mixed numbers from an input stream. The input format for a Mixed number object will be:
     integer numerator/denominator 
    

    i.e. the integer part, a space, and the fraction part (in numerator/denominator form), where the integer, numerator, and denominator parts are all of type int. You may assume that this will always be the format that is entered (i.e. your function does not have to handle entry of incorrect types that would violate this format). However, this function should check the values that come in. In the case of an incorrect entry, just set the Mixed object to represent the number 0, as a default. An incorrect entry occurs if a denominator value of 0 is entered, or if an improper placement of a negative sign is used. Valid entry of a negative number should follow this rule -- if the integer part is non-zero, the negative sign is entered on the integer part; if the integer part is 0, the negative sign is entered on the numerator part (and therefore the negative sign should never be in the denominator). Examples:

     Valid inputs:     2 7/3 , -5 2/7  , 4 0/7  , 0 2/5  , 0 -8/3 
     Invalid inputs:   2 4/0 , -2 -4/5 , 3 -6/3 , 0 2/-3 
    
  5. Create an overload of the insertion operator << for output of Mixed numbers. This should output the mixed number in the same format as above, with the following exceptions: If the object represents a 0, then just display a 0. Otherwise: If the integer part is 0, do not display it. If the fraction part equals 0, do not display it. For negative numbers, the minus sign is always displayed to the left.
     Examples:   0  ,  2  ,  -5  ,  3/4  ,  -6/7  ,  -2 4/5  ,  7 2/3 
    
  6. Create overloads for all 6 of the comparison operators ( < , > , <= , >= , == , != ). Each of these operations should test two objects of type Mixed and return an indication of true or false. You are testing the Mixed numbers for order and/or equality based on the usual meaning of order and equality for numbers. (These functions should not do comparisons by converting the Mixed numbers to decimals -- this could produce round-off errors and may not be completely accurate).
  7. Create operator overloads for the 4 standard arithmetic operations ( + , - , * , / ) , to perform addition, subtraction, multiplication, and division of two mixed numbers. Each of these operators will perform its task on two Mixed objects as operands and will return a Mixed object as a result - using the usual meaning of arithmetic operations on rational numbers. Also, each of these operators should return their result in simplified form. (e.g. return 3 2/3 instead of 3 10/15, for example).
    • In the division operator, if the second operand is 0, this would yield an invalid result. Since we have to return something from the operator, return 0 as a default (even though there is no valid answer in this case). Example:
      Mixed m(1, 2, 3);               // value is 1 2/3
      Mixed z;                        // value is 0
      Mixed r = m / z;                // r is 0 (even though this is not good math)
      
  8. Create overloads for the increment and decrement operators (++ and --). You need to handle both the pre- and post- forms (pre-increment, post-increment, pre-decrement, post-decrement). These operators should have their usual meaning -- increment will add 1 to the Mixed value, decrement will subtract 1. Since this operation involves arithmetic, leave incremented (or decremented) object in simplified form (to be consistent with other arithmetic operations). Example:
      Mixed m1(1, 2, 3);            //  1 2/3
      Mixed m2(2, 1, 2);            //  2 1/2
      cout << m1++;                   //  prints 1 2/3, m1 is now 2 2/3
      cout << ++m1;                   //  prints 3 2/3, m1 is now 3 2/3
      cout << m2--;                   //  prints 2 1/2, m2 is now 1 1/2
      cout << --m2;                   //  prints 1/2  , m2 is now 0 1/2
    
  9. General Requirements
    • As usual, no global variables
    • All member data of the Mixed class must be private
    • Use the const qualifier whenever appropriate
    • The only libraries that may be used in the class files are iostream and iomanip
    • Do not use langauge or library features that are C++11-only
    • Since the only output involved with your class will be in the << overload (and commands to invoke it will come from some main program or other module), your output should match mine exactly when running test programs.

In: Computer Science

1. Suppose there are two assets, Asset 1 and Asset 2. You are given the following...

1.

Suppose there are two assets, Asset 1 and Asset 2. You are given the following information about the two assets.

E(R1)   = 0.12                       E(s1)   = 0.05

E(R2)   = 0.20                       E(s2)   = 0.08

  1. Calculate the expected returns and expected standard deviations of a two-stock portfolio in which Stock 1 has a weight of 70 percent under the following conditions.

  1. r1,2    =    1.00
  2. r1,2    =   0.50
  3. r1,2    =   0.00
  4. r1,2    = –0.50
  5. r1,2    = –1.00

Show your calculations.

  1. Which of these portfolios has the most risk? Why?

In: Finance

1.Three goods are produced and consumed in an economy during years 1 and 2. The table...

1.Three goods are produced and consumed in an economy during years 1 and 2. The table shows prices (P1 and P2) for each good and the quantities produced (Q1 and Q2) for each good. The base year is year 1. Good P1 Q1 P2 Q2 Milk (gallons) $4.10 40 $4.20 50 Beef (pounds) $1.90 20 $2.20 25 Carrots (bags) $4.50 10 $4.80 15 Enter numbers rounded to two decimal places in each blank.

Real GDP in year 1 is $ . Real GDP in year 2 is $ .

2.

A country has nominal GDP equal to $216.18 billion in 2018. The GDP deflator in 2018 has a value of 110.42. What was the value of real GDP, in billions of dollars.

Round to two decimal places. If your answer is 3.2 billion then just enter 3.2.

In: Economics

1-The length of a complete business cycle- A-varies from about 1 to 2 years to as...

1-The length of a complete business cycle-

A-varies from about 1 to 2 years to as long as 5 years.

B-is generally about 3 years.

C-varies greatly in duration and intensity.

2. Even though the United States has an unemployment compensation program that provides income for those out of work, should we still worry about unemployment?

A-Yes, because the unemployment compensation program merely gives the unemployed enough funds for basic needs.

B-Yes, because the unemployment compensation program is not available to workers in the service occupations.

C-No, since the program gives the unemployed only enough funds for basic needs, it will encourage them to find jobs quicker.

D-No, since the unemployment compensation helps keep demand in the economy high, workers will eventually return to their jobs.

3. The Bureau of Labor Statistics (BLS) calculates the inflation rate from one year to the next by

A-adding the CPI of the previous year to the CPI of the most recent year, and then dividing by the average of both years.

B-subtracting the CPI of the previous year from the CPI of the most recent year, and then dividing by the CPI of the most recent year.

C-adding the CPI of the previous year to the CPI of the most recent year, and then dividing by 2.

D-subtracting the CPI of the previous year from the CPI of the most recent year, and then dividing by the CPI of the previous year.

4. Who gains from inflation?

A-Borrowers

B-Lenders

C-No one benefits from inflation.

D-Those with the most skill.

In: Economics

1. y = 2x3 - 3x + 1 [-2,2] 2. y = 7 - x2 [-1,2]...

1. y = 2x3 - 3x + 1 [-2,2]

2. y = 7 - x2 [-1,2]

3. y = ex [0,ln4]

for each of the following 1-3, is the instantaneous rate of change equal to the average rate of change? If so, where?

4. for each of the following a-c,  find the critical points, determine if there is an absolute max and or min, if so, find them

a. y = 2x3 - 15x2 + 24x [0,5]

b. y = x / (x2+3)2 on [-2,2]

c. (4x3 / 3 ) + 5x2 - 6x on [-4,1]

In: Math

Problem 1: For the following linear programming problem: ???????? ? = 40?1 + 50?2 Subject to...

Problem 1: For the following linear programming problem: ???????? ? = 40?1 + 50?2

Subject to constraints:

3?1 − 6?2 ≥ 30

?1 – 15 ≤ 3?2 2

?1 + 3 ?2 = 24

?1, ?2 ≥ 0

1- Find the optimal solution using graphical solution corner points method or iso profit line method. Please, show the values for state variable, decisions variables, and slack and surplus variables

2- Determine the value for basic solution and non-basic solution, binding constraints and nonbinding constrains, and if there are any redundant constraints

3- Identify if there is any special case solution and state it.

solve using linear programming graphical solution

In: Advanced Math

1. (Public Goods Game) Suppose that there are two people, Agent 1 and Agent 2 in...

1. (Public Goods Game) Suppose that there are two people, Agent 1 and Agent 2 in a town.
Assume that there is no street light in the town. To build a street light, someone should pay
costs and once it is built, everyone can enjoy the benefit of street light as there is no way to
force not to use it. Once the street light is build, while Agent 1 has 10 payoff, Agent 2 has 5
payoff. If only one person paid for it, the cost of building a street light is 6. If both agents
paid, each person needs to pay only half of it, thus the cost in this case is 3. As a result, the
payoff matrix of this public goods game is as follows.

pay not pay
pay 7,2 4,5
not pay 10,1 0,0

(a) What are BR1(Pay) and BR1(Not Pay)? And what are BR2(Pay) and BR2(Not Pay)?
(b) What is the Nash Equilibrium (NE)?
(c) Suppose that there are many agents who have the same preference of Agent 2. In that
case, what would be the NE? Please explain this with Free Rider problem.

In: Economics

1. 1- Make an argument for using the WACC to evaluate leasing.  2- How is this consistent...

1. 1- Make an argument for using the WACC to evaluate leasing.  2- How is this consistent with other capital budgeting problems?  3- How does the “sequencing problem” come into play?

In: Accounting

1) Inside the graph of r = 1 + cos 3Ό 2) Inside the circle r...

1) Inside the graph of r = 1 + cos 3Ό

2) Inside the circle r = -6 cos Ό and outside the circle r = 3

In: Math