Questions
A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, he...

A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, he decides to cancel class if fewer than some number of students are present when class starts. Arrival times go from on time (arrivalTime < 0) to arrival late (arrivalTime > 0).Given the arrival time of each student and a threshhold number of attendees, determine if the class is canceled.

Input Format

The first line of input contains t, the number of test cases.

Each test case consists of two lines.

The first line has two space-separated integers, n and k, the number of students (size of a) and the cancellation threshold.
The second line contains n space-separated integers (a[1], a[2],....,a[n]) describing the arrival times for each student.

Note: Non-positive arrival times (a[i] < 0) indicate the student arrived early or on time; positive arrival times (a[i] > 0) ) indicate the student arrived minutes late.

For example, there are n=6 students who arrive at times a = [-1,-1,0,0,1,1]. Four are there on time, and two arrive late. If there must be for class to go on, in this case the class will continue. If there must be k = 4 for class th

, then class is cancelled.

Function Description

Complete the angryProfessor function in the editor below. It must return YES if class is cancelled, or NO otherwise.

angryProfessor has the following parameter(s):

  • k: the threshold number of students
  • a: an array of integers representing arrival times

Constraints

Output Format

For each test case, print the word YES if the class is canceled or NO if it is not.

Note
If a student arrives exactly on time (ai = 0), the student is considered to have entered before the class started.

Sample Input

2
4 3
-1 -3 4 2
4 2
0 -1 2 1

Sample Output

YES
NO

Explanation

For the first test case, k = 3. The professor wants at least 3 students in attendance, but only 2 have arrived on time (-3 and -1 ) so the class is cancelled.

For the second test case, k = 2. The professor wants at least 2 students in attendance, and there are 2 who have arrived on time (0 and -1 ) so the class is not cancelled.

#include <bits/stdc++.h>

using namespace std;

vector<string> split_string(string);

// Complete the angryProfessor function below.

string angryProfessor(int k, vector<int> a) {

}

int main()

{

ofstream fout(getenv("OUTPUT_PATH"));

int t;

cin >> t;

cin.ignore(numeric_limits<streamsize>::max(), '\n');

for (int t_itr = 0; t_itr < t; t_itr++) {

string nk_temp;

getline(cin, nk_temp);

vector<string> nk = split_string(nk_temp);

int n = stoi(nk[0]);

int k = stoi(nk[1]);

string a_temp_temp;

getline(cin, a_temp_temp);

vector<string> a_temp = split_string(a_temp_temp);

vector<int> a(n);

for (int i = 0; i < n; i++) {

int a_item = stoi(a_temp[i]);

a[i] = a_item;

}

string result = angryProfessor(k, a);

fout << result << "\n";

}

fout.close();

return 0;

}

vector<string> split_string(string input_string) {

string::iterator new_end = unique(input_string.begin(), input_string.end(), [] (const char &x, const char &y) {

return x == y and x == ' ';

});

input_string.erase(new_end, input_string.end());

while (input_string[input_string.length() - 1] == ' ') {

input_string.pop_back();

}

vector<string> splits;

char delimiter = ' ';

size_t i = 0;

size_t pos = input_string.find(delimiter);

while (pos != string::npos) {

splits.push_back(input_string.substr(i, pos - i));

i = pos + 1;

pos = input_string.find(delimiter, i);

}

splits.push_back(input_string.substr(i, min(pos, input_string.length()) - i + 1));

return splits;

}

In: Computer Science

Resources: Pastas R Us, Inc. Database & Microsoft ExcelÂŽ, Wk 1: Descriptive Statistics Analysis Assignment Purpose...

Resources: Pastas R Us, Inc. Database & Microsoft ExcelÂŽ, Wk 1: Descriptive Statistics Analysis Assignment

Purpose

This assignment is intended to help you learn how to apply statistical methods when analyzing operational data, evaluating the performance of current marketing strategies, and recommending actionable business decisions. This is an opportunity to build critical-thinking and problem-solving skills within the context of data analysis and interpretation. You’ll gain a first-hand understanding of how data analytics supports decision-making and adds value to an organization.

Scenario:

Pastas R Us, Inc. is a fast-casual restaurant chain specializing in noodle-based dishes, soups, and salads. Since its inception, the business development team has favored opening new restaurants in areas (within a 3-mile radius) that satisfy the following demographic conditions:

  • Median age between 25 – 45 years old
  • Household median income above national average
  • At least 15% college educated adult population

Last year, the marketing department rolled out a Loyalty Card strategy to increase sales. Under this program, customers present their Loyalty Card when paying for their orders and receive some free food after making 10 purchases.

The company has collected data from its 74 restaurants to track important variables such as average sales per customer, year-on-year sales growth, sales per sq. ft., Loyalty Card usage as a percentage of sales, and others. A key metric of financial performance in the restaurant industry is annual sales per sq. ft. For example, if a 1200 sq. ft. restaurant recorded $2 million in sales last year, then it sold $1,667 per sq. ft.

Executive management wants to know whether the current expansion criteria can be improved. They want to evaluate the effectiveness of the Loyalty Card marketing strategy and identify feasible, actionable opportunities for improvement. As a member of the analytics department, you’ve been assigned the responsibility of conducting a thorough statistical analysis of the company’s available database to answer executive management’s questions.

Report:

Write a 750-word statistical report that includes the following sections:

  • Section 1: Scope and descriptive statistics
  • Section 2: Analysis
  • Section 3: Recommendations and Implementation

Section 1 - Scope and descriptive statistics

  • State the report’s objective.
  • Discuss the nature of the current database. What variables were analyzed?
  • Summarize your descriptive statistics findings from Excel. Use a table and insert appropriate graphs.

Section 2 - Analysis

  • Using Excel, create scatter plots and display the regression equations for the following pairs of variables:
  • “BachDeg%” versus “Sales/SqFt”
  • “MedIncome” versus “Sales/SqFt”
  • “MedAge” versus “Sales/SqFt”
  • “LoyaltyCard(%)” versus “SalesGrowth(%)”
  • In your report, include the scatter plots. For each scatter plot, designate the type of relationship observed (increasing/positive, decreasing/negative, or no relationship) and determine what you can conclude from these relationships.

Section 3: Recommendations and implementation

  • Based on your findings above, assess which expansion criteria seem to be more effective.Could any expansion criterion be changed or eliminated? If so, which one and why?
  • Based on your findings above, does it appear as if the Loyalty Card is positively correlated with sales growth? Would you recommend changing this marketing strategy?
  • Based on your previous findings, recommend marketing positioning that targets a specific demographic. (Hint: Are younger people patronizing the restaurants more than older people?)
  • Indicate what information should be collected to track and evaluate the effectiveness of your recommendations. How can this data be collected? (Hint: Would you use survey/samples or census?)

Cite references to support your assignment.

In: Operations Management

Homework 3 – Programming with C++ What This Assignment Is About: • Classes and Objects •...

Homework 3 – Programming with C++

What This Assignment Is About: • Classes and Objects • Methods • Arrays of Primitive Values • Arrays of Objects • Recursion • for and if Statements • Insertion Sort

2. Use the following Guidelines • Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc). • User upper case for constants. Use title case (first letter is upper case) for classes. Use lower case with uppercase word separators for all other identifiers (variables, methods, objects) • Use tabs or spaces to indent code within blocks (code surrounded by braces). This includes classes, methods, and code associated with ifs, switches and loops. Be consistent with the number of spaces or tabs that you use to indent. • Use white space to make your program more readable. For each file in your assignment, provide a heading (in comments) which includes: • The assignment number. • Its author (your name). • A description of what this program is doing.

3. Part 1. Primitive Types, Searching, Recursion (35 points). a) In the file homework_part_1.cpp (available on Canvas), add header comments and function comments b) Implement the function initializeArray that receives two parameters: an array of integers and the array size. Use a for loop and an if statement to put 0s in the odd positions of the array and 5s in the even positions. You must use pointers to work with the array. Hint: review pointers as parameters.

c) Implement the function printArray that receives as parameters an array of integers and the array size. Use a for statements to print all the elements in the array. You must use pointers to work with the array. Hint: review pointers as parameters.

d) Implement the function arrayInsertionSort that receives as parameters an array of integers and the array size, and order the array’s elements in descending order. Implement Insertion Sort algorithm. It should be Insertion Sort, not Selection Sort, not Quick Sort, etc.

e) Implement the recursive function that calculates and returns the factorial of a number. The function receives the number (integer number) as parameter

f) Compile and run the code for homework_part_1.cpp Any changes made to the main method of the file will be penalized unless otherwise instructed

using namespace std;

void initializeArray(int* array, int length)

{

}

void printArray(int* array, int length)

{

}

void insertionSort(int* array, int length)

{

}

int factorial(int num)

{

return 0;

}

int main()

{

int a[] = {2, 5, 7, 9, 12, 13, 15, 17, 19, 20};

int b[] = {18, 16, 19, -5, 3, 14, 6, 0};

int c[] = {4, 2, 5, 3, 1};

/* testing initialize_array */

printArray(a, sizeof(a)/sizeof(a[0])); /* print: 2, 5, 7, 9, 12, 13, 15, 17,

19, 20 */

initializeArray(a, sizeof(a)/sizeof(a[0]));

printArray(a, sizeof(a)/sizeof(a[0])); /* print: 5, 0, 5, 0, 5, 0, 5, 0, 5, 0

*/

/* testing insertionSort */

printArray(b, sizeof(b)/sizeof(b[0])); /* print: 18, 16, 19, -5, 3, 14, 6, 0 */

insertionSort (b, sizeof(b)/sizeof(b[0]));

printArray(b, sizeof(b)/sizeof(b[0])); /* print: 19, 18, 16, 14, 6, 3, 0, -5 */

/* testing factorial */

cout << factorial(5) << endl; /* print: 120 */

c[0] = factorial (c[0]);

c[1] = factorial (c[2]);

printArray(c, sizeof(c)/sizeof(c[0])); /* print: 24, 120, 5, 3, 1 */

return 0;

}

In: Computer Science

C code please (1) Prompt the user to enter a string of their choosing. Store the...

C code please

(1) Prompt the user to enter a string of their choosing. Store the text in a string. Output the string. (1 pt)

Ex:

Enter a sample text:
we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  nothing ends here;  our hopes and our journeys continue!

You entered: we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  nothing ends here;  our hopes and our journeys continue!


(2) Implement a PrintMenu() function, which has a string as a parameter, outputs a menu of user options for analyzing/editing the string, and returns the user's entered menu option. Each option is represented by a single character.

If an invalid character is entered, continue to prompt for a valid choice. Hint: Implement Quit before implementing other options. Call PrintMenu() in the main() function. Continue to call PrintMenu() until the user enters q to Quit. (3 pts)

Ex:

MENU
c - Number of non-whitespace characters
w - Number of words
f - Fix capitalization
r - Replace all !'s
s - Shorten spaces
q - Quit

Choose an option:


(3) Implement the GetNumOfNonWSCharacters() function. GetNumOfNonWSCharacters() has a constant string as a parameter and returns the number of characters in the string, excluding all whitespace. Hint: Using fgets() to read input will cause your string to have a newline character at the end. The newline character should not be counted by GetNumOfNonWSCharacters(). Call GetNumOfNonWSCharacters() in the PrintMenu() function. (4 pts)

Ex:

Number of non-whitespace characters: 181


(4) Implement the GetNumOfWords() function. GetNumOfWords() has a constant string as a parameter and returns the number of words in the string. Hint: Words end when a space is reached except for the last word in a sentence. Call GetNumOfWords() in the PrintMenu() function. (3 pts)

Ex:

Number of words: 35


(5) Implement the FixCapitalization() function. FixCapitalization() has a string parameter and updates the string by replacing lowercase letters at the beginning of sentences with uppercase letters. FixCapitalization() DOES NOT output the string. Call FixCapitalization() in the PrintMenu() function, and then output the edited string. (3 pts)

Ex:

Edited text: We'll continue our quest in space.  There will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  Nothing ends here;  our hopes and our journeys continue!


(6) Implement the ReplaceExclamation() function. ReplaceExclamation() has a string parameter and updates the string by replacing each '!' character in the string with a '.' character. ReplaceExclamation() DOES NOT output the string. Call ReplaceExclamation() in the PrintMenu() function, and then output the edited string. (3 pts)

Ex.

Edited text: we'll continue our quest in space.  there will be more shuttle flights and more shuttle crews and,  yes,  more volunteers, more civilians,  more teachers in space.  nothing ends here;  our hopes and our journeys continue.


(7) Implement the ShortenSpace() function. ShortenSpace() has a string parameter and updates the string by replacing all sequences of 2 or more spaces with a single space. ShortenSpace() DOES NOT output the string. Call ShortenSpace() in the PrintMenu() function, and then output the edited string. (3 pt)

Ex:

Edited text: we'll continue our quest in space. there will be more shuttle flights and more shuttle crews and, yes, more volunteers, more civilians, more teachers in space. nothing ends here; our hopes and our journeys continue!

#include<stdio.h>
#include <string.h>

int main(void) {

/* Type your code here. */

return 0;
}

In: Computer Science

Should Prescription Drugs be Allowed to be Advertised Directly to Consumers? Yes No The question of...

Should Prescription Drugs be Allowed to be Advertised Directly to Consumers?
Yes No

The question of whether DTCA should be legal has been a heated debate in many countries. DTCA can be a great tool for informing consumers and improving lives, and such ads should remain legal in the United States for several reasons.

One reason DTCA should be allowed is that it can inform consumers about diseases they may have and possible treatments for those diseases. Being that the ads in question are prescription drug ads, DTCA also encourages consumers to seek help from their doctors before using the drug. DTCA can educate consumers about illnesses they may or may not have realized they were suffering from and so encourage them to seek treatment and improve their lives.

Another benefit of DTCA is that, like any other form of advertisement, it gets the word out about a product (in this case, prescription drugs) which can lead to more sales for the pharmaceutical companies that produce them. More sales leads to more revenue, which can be used to research new and better life-improving medications. In effect, the advertising of today can save lives tomorrow.

Perhaps one of the most straightforward reasons why DTCA should remain legal is that it should be allowed as protected free speech. Ford and Chrysler can advertise their new cars; why can’t pharmaceutical companies advertise their new legal, FDA-approved, life-improving drugs? The First Amendment should protect DTCA as it does almost all other forms of advertisement.

The advertisement of prescription drugs represents a potential threat to consumers everywhere. In fact, direct-to-consumer drug advertisement (DTCA) has been deemed so unsafe that every country besides the United States and New Zealand has banned it outright. There are many reasons why DTCA should be banned in the United States as well.

First, DTCA ads can misinform consumers and can lead to consumers misdiagnosing themselves. A 2013 study published in the Journal of General Internal Medicine found that 55 percent of claims made in DTCA were “potentially misleading,” while 2 percent were “false.” DTCA can mislead consumers to request drugs and seek treatment for diseases that the ads lead them to believe they have, which in turn can mean adverse medical results from taking unnecessary medications.

Second, drugs are often advertised through DTCA before theirPage 1046long-term health effects are fully known. Contrary to the belief of many consumers, drugs can be advertised and sold before long-term safety trials have been completed. The drug Vioxx was marketed, requested by patients, and prescribed before being taken off the market after being linked to over 4,500 deaths related to strokes and heart attacks induced by the drug.

Consumers aren’t the only people being negatively affected by DTCA. A large portion of medical doctors have reported having patients request advertised drugs that were inappropriate for their treatment, and many of these doctors have felt pressured to prescribe the inappropriate drugs. And even if a doctor refuses to prescribe the drug, a 2013 study found that 50 percent of patients were “disappointed” in their doctors for refusing to prescribe an advertised drug and 25 percent of patients surveyed would try to convince the doctor to give them the drug or acquire the drug somewhere else. Not even wary doctors can prevent consumers from falsely medicating themselves as a result of DTCA.

Review the Point/Counterpoint at the end of Chapter 45. Do you agree with the Yes or No groups? Why?

In: Operations Management

A wastewater treatment plant that treats wastewater to secondary treatment standards uses a primary sedimentation process...

A wastewater treatment plant that treats wastewater to secondary treatment standards uses a primary sedimentation process followed by an activated sludge process composed of aeration tanks and a secondary clarifiers.
This problem focuses on the activated sludge process.

The activated sludge process receives a flow of 15 million gallons per day (MGD).
The primary sedimentation process effluent has a BOD5 concentration of 180 mgBOD5/L (this concentration is often referred as S). Before flowing into the activated sludge process, the primary effluent is mixed with the returned activated sludge (RAS) – concentrated biomass - that is continuously pumped out of the bottom of the secondary clarifiers. The returned activated sludge (RAS) ratio is 25%, in other word, an equivalent of 25% of plant flow (15 MGD) is pumped out of the bottom of the secondary clarifiers. The mixture of primary effluent and RAS forms make up the activated sludge, which is also called mixed liquor. The resulting mixed liquor has a total suspended solids (TSS) concentration of 2,500 mgTSS/L and a total volatile suspended solids (TVSS) concentration of 2,125 mgTVSS/L (this biomass concentration is often referred as X).
It flows into aeration thanks that have a total volume of 2.5 million gallons (Mgal) (this volume is often referred as V).

The mixed liquor then flow to secondary clarifiers that have a total volume of 5 million gallons.

Activated that settles at the bottom of the secondary clarifiers is pumped out of the tank. The majority is continuously sent back to the aeration tank as RAS but some is removed from the activated sludge process as waste activated sludge (WAS). The WAS has an average TSS concentration of 10,000 mg/L and a total mass of 10,000 lb of WAS TSS is removed every day.

The final effluent has an average BOD5 concentration of 12 mgBOD5/L and an average TSS concentration of 10 mg/L.

1. Draw a schematic of the activated sludge process and insert the different values given in the question.

  1. What is the average RAS flowrate? (answer will be given in the unit of !!"#$" ?? ???) %&'

  2. What is the average aeration process hydraulic detention time? Remember to include the RAS flowrate in your calculation (answer will be given in the unit of (hr))

  3. What is the aeration process average BOD5 loading rate? Remember that the RAS data is

    not included in this calculation (answer will be given in the unit of ! $(*+, ")

    -... /0!1/ 23&4012 . %&'

  4. What is the total mass of biomass present in the aeration tanks? (answer will be given in the unit of (lb TVSS))

6. What is the activated sludge food to microorganism (F/M) ratio? (answer will be given in the unit of ! $( *+, ") )

67 89:;; . %&'

  1. The final effluent TSS is assumed to be composed of biomass that was not captured in the secondary clarification process. Therefore, the mass of final effluent TSS has to be included in the total amount of biomass removed (biomass leaving the system). With that said, what is the daily mass of TSS or biomass leaving the system with the final effluent? (answer will be given in the unit of (lb FE TSS))

  2. What is the activated system sludge retention time (also called sludge age or mean cell retention time) when only considering the mass of activated sludge present in the aeration tank? (use the biomass TSS values for this question) (answer will be given in the unit of (day))

  3. Based on the ”general loading and operational parameters for activated sludge process” table below, which activated process is the plant operating? (answer will be one of the 5 processes listed in the table)

10. Knowing the mass of WAS TSS removed and the WAS TSS concentration, what is the daily volume of WAS removed from the system? (answer will be given in the unit of (gallon/day))

  1. Will the sludge age increase if the volume and mass of WAS removed from the system increase? (answer will be given as yes or no)

  2. Will the type of bacteria present in the activated sludge and its performance likely to change as the sludge age is increased or decreased? (answer will be given as yes or no)

In: Civil Engineering

Meet the Marcottes, Martin and Luz Marcotte that is. Martin is a successful graphics designer who...

Meet the Marcottes, Martin and Luz Marcotte that is. Martin is a successful graphics designer who is 38 years old, while Luz is a counseling psychologist, 35 years old and is working at a State facility in Kansas. They have a 10 year old daughter Paloma, who is in the first grade, and a three year old son Joel, who goes to the nearby daycare center. The Marcottes will be facing numerous challenges as the financial planning topics progress, which will require you to practice sound financial decision making, and in other instances where there is a sufficient time horizon, some prudent financial planning.

Currently, Luz is finishing her doctoral program in Psychology, while maintaining a parttime status at the Habilitation Center where she works. The Marcottes own a home, two cars, have approximately $10,000 saved up in various savings and investment accounts, and own some assets around the house. They are also vested in their 401ks that they maintain at their respective places of employment. Presently, there are some financial issues facing this couple, they have not addressed. Although, they both have jobs where they make decent salaries, they have not really thought about their children’s educational needs. Inflation in the cost of college education is a reality for most parents, which has to be kept in mind when planning for the future. Moreover, Martin’s mom who is in her late seventies, has been facing declining health, and will not be able to live by herself, like she has been, for very long. Luz, who is originally from Peru, also sends regular amounts of money to her family, but her folks are also aging and may need some financial assistance in the future.

Lastly, since they lead a fairly hectic lifestyle, they have not given much thought to their own retirements, or the possibility of how they would handle a layoff from work. Consider the situation where Martin has been told by his boss that due to lower sales the company is anticipating layoffs. After getting the word Martin came home and talked to his wife and the kids.

They decided to make up a list of 3 things.(1) bills they have to pay each month (2) areas where they can reduce the spending and (3) sources of funds to help them pay current expenses. Each family member has several ideas on how to cope with the impending financial situation.

Currently the Marcottes monthly take-home pay is $3165. Each month, the money broadly goes for the following items: Rent $880 Utilities $180 Food $560 Auto Expenses $480 Clothing $300 Insurance $280 Savings $250 Personal Items $225

After Martin is laid off, the monthly income will drop to $1550 from his wife’s income and his unemployment benefits. The Marcottes have $12,000 in various savings and investments accounts for the children’s education. Besides this they have about $24,000 in their retirement accounts and investments.

Q1: What items might the Marcottes consider reducing to cope with their financial difficulties? Please explain the detail. What alternative actions can they take to reduce some of their expenses?

Q2: How should the Marcottes use their savings and retirement funds during the financial crisis? Analyze and list in detail.

Q3: What additional sources of funds might be available to them during their time of employment? (think out of the box)

Q4: What other current and future financial actions would you recommend to the Marcottes?

Q5: Based on the information above, how should the Marcottes have in an emergency fund? What steps should they take to reach that amount?

In: Finance

Exercise 12.1: Empowerment Profile Step 1 Complete the following questionnaire. For each of the following items,...

Exercise 12.1: Empowerment Profile

Step 1

Complete the following questionnaire. For each of the following items, select the alternative with which you feel more comfortable. While for some items you may feel that both (a) and (b) describe you or neither is ever applicable, you should select the alternative that better describes you most of the time.

When I have to give a talk or write a paper, I . . .

________

Base the content of my talk or paper on my own ideas.

________

Do a lot of research, and present the findings of others in my paper or talk.

When I read something I disagree with, I . . .

________

Assume my position is correct.

________

Assume what’s presented in the written word is correct.

When someone makes me extremely angry, I . . .

________

Ask the other person to stop the behavior that is offensive to me.

________

Say little, not quite knowing how to state my position.

When I do a good job, it is important to me that . . .

________

The job represents the best I can do.

________

Others take notice of the job I’ve done.

When I buy new clothes, I . . .

________

Buy what looks best on me.

________

Try to dress in accordance with the latest fashion.

When something goes wrong, I . . .

________

Try to solve the problem.

________

Try to find out who’s at fault.

As I anticipate my future, I . . .

________

Am confident I will be able to lead the kind of life I want to lead.

________

Worry about being able to live up to my obligations.

When examining my own resources and capacities, I . . .

________

Like what I find.

________

Find all kinds of things I wish were different.

When someone treats me unfairly, I . . .

________

Put my energies into getting what I want.

________

Tell others about the injustice.

When someone criticizes my efforts, I . . .

________

Ask questions to under-stand the basis for the criticism.

________

Defend my actions or decisions, trying to make my critic understand why I did what I did.

When I engage in an activity, it is very important to me that . . .

________

I live up to my own expectations.

________

I live up to the expectations of others.

When I let someone else down or disappoint them, I . . .

________

Resolve to do things differently next time.

________

Feel guilty, and wish I had done things differently.

I try to surround myself with people . . .

________

Whom I respect.

________

Who respect me.

I try to develop friendships with people who . . .

________

Are challenging and exciting.

________

Can make me feel a little safer and a little more secure.

I make my best efforts when . . .

________

I do something I want to do when I want to do it.

________

Someone else gives me an assignment, a deadline, and a reward for performing.

When I love a person, I . . .

________

Encourage him or her to be free and choose for himself or herself.

________

Encourage him or her to do the same thing I do and to make choices similar to mine.

When I play a competitive game, it is important to me that I . . .

________

Do the best I can.

________

Win.

I really like being around people who . . .

________

Can broaden my horizons and teach me something.

________

Can and want to learn from me.

My best days are those that . . .

________

Present unexpected opportunities.

________

Go according to plan.

When I get behind in my work, I . . .

________

Do the best I can and don’t worry.

________

Worry or push myself harder than I should.

Step 2


Score your responses as follows:

Total your (a) responses: ___________

Total your (b) responses: ___________

Reflect on the overall pattern of your a) and b) responses.

In: Operations Management

Please do this in C++ only. Please Show your code and your output too. Would you...

Please do this in C++ only. Please Show your code and your output too. Would you focus on number 2 in the Required functions:? Please use all the variables in the program.

The assignment problem:

You are asked to develop an application that prints a bank’s customers' names, IDs, and accounts balances in different ways. In this program, you need to read a file of customer’s data into different arrays, pass these arrays to functions as (array parameter), calculate the total balance for all customers, then print some information. The input file “input.txt” contains the following information (ID, first name, last name, savings account balance, checking account balance). You have to store these different columns in different arrays where each index represents customer data.


Preliminaries

1. We will consider the file contains 10 rows maximum. So all your arrays size must be at least 10.

2. Since the size of all the arrays is 10, so it is better to create a constant variable with the value 10 than hard coding the arrays size.

3. Create five different arrays with different types based on the data in the file (for ID, First, Last, saving, and checking)

4. Create a “switch” statement with four options and the output should be generated based on the chose option. Check the options below:

1. Print customer information

2. Print all customer Names ordered by their Last Name.

3. Print Bank’s total amount.

4. Enter q/Q to quit

Required functions:

1. A function “printCustomersData” should be called when the user chooses the first option. This function is of type void (it does not return anything). “printCustomersData” function should print a table of the customers data with the following order format: “LastName , First Name , ID , Saving Account, Checking Account.”

2. The function “printNames” will print the Names (first and last) of customers in alphabetic order by their last name.

3. The function “printBankTotal” that prints the summation of the balance of all customers saving account ($17410.31) and the summation of the balance of all customers checking accounts ($27430.01).


4. If the user entered something not in the options such as the letter ‘a’, the application should not be terminated. Instead, the application should print a message that tells the user that his/her input was incorrect, then the options should be displayed again, and the application should ask the user to enter another option.

5. The Menu options will be printed after each selection. Even when the user enters an invalid value. The only way to terminate the program is to enter ‘q’ or ‘Q’ which is the fourth option.

Hints:

1. Create an “if” statement to check if the file reading process went well. You can use many expressions such as: (!fin) or (fin.fail()), etc.

2. Use the function “setw(number)” that helps you to print the data in a shape of table. This function sets the number of spaces for each output. The function is in the <iomanip> library.

3. Save the whole project and zip it before uploading it to Canvas. (Do not submit only the ‘.cpp’ file and do not copy and paste your code to a ‘.txt’ file or Word file).

This what you will have in the “input.txt”

10 Homer Smith 810.2 101.10
20 Jack Stanely 100.0 1394.90
30 Daniel Hackson 333.90 7483.77
40 Sara Thomson 1930.02 4473.20
50 Thomas Elu 932.0 2334.30
60 Sam Carol 33.0 0.0
70 Tina Jefferson 334.90 777.5
80 Wael Lion 8843.2 88.90
90 Carol Smith 3994.09 2343.30
100 Jack Carlton 99.0 8433.04

In: Computer Science

Estoppel: The doctrine of estoppel may prevent the union or the employer from relying on and...

Estoppel:

The doctrine of estoppel may prevent the union or the employer from relying
on and enforcing the terms of the collective agreement. Where a party makes a
representation to the other, by way of words or conduct, indicating that an issue will be
dealt with in a manner different from the provisions of the agreement, the party who
made the representation will not be able to later insist upon the collective agreement
being enforced.
Statements made by a party to the agreement could be the basis for an estoppel. In one
case, a collective agreement provided that layoffs would occur in reverse order of seniority.
The employer, a hospital, hired two laboratory technicians. The hiring manager assured
both technicians when they were hired that they would not be laid off because of funding
cuts or the return of other employees to the department. However, the hospital laid off the
technicians 14 months after they were hired when other employees returned to the bargaining
unit. When the employees objected, they were told that the collective agreement was
clear on the question of seniority on layoffs and there was nothing that could be done
because they had the least seniority. A grievance was filed, and the arbitrator held that the
doctrine of estoppel applied.20 Because of the representations made to the technicians
before they were hired, the employer could not rely on the collective agreement, and the
layoff of the technicians was nullified.
Estoppel is a legal concept providing
that if a party makes a representation
that an issue will be dealt with in a
manner different from the provisions of
the collective agreement, it will not be
able to later insist upon the collective
agreement being enforced as written.
222 Chapter 9
The union and the employer should be alert to the possibility of estoppel based on
conduct or past practice. In one case, the collective agreement provided that certain benefits
would be paid to employees after a three-day waiting period.21 Despite the terms of the
collective agreement, the employer had a long-established practice of paying employees
benefits during the three-day period. When the employer indicated it would enforce the
three-day waiting period in the future, the union filed a grievance relying on estoppel. The
arbitrator upheld the grievance and ordered the employer to continue to pay the benefits
according to its practice for the balance of the term of the agreement.
Similarly, a union might be caught by an estoppel argument based on prior past practice
if it failed to enforce all the terms of the agreement. For example, a collective agreement
will usually provide for a probationary period. If the employer made a habit of
extending the period, in breach of the agreement, and the union took no action, the union
may not be allowed to object to an extension of the period on the basis of estoppel.22
An estoppel will not be established by a single failure to comply with or enforce the
collective agreement; however, employers and unions should be aware of the risk of
repeated failures to enforce a term of the agreement. An employer who wanted to vary
from the collective agreement to deal with a short-term issue might consider consulting
with the union and attempting to reach an agreement that would prevent an estoppel
argument being raised when the employer wished to revert to the terms of the agreement.
If the agreement provided for a rate of remuneration for employees who drove their own
cars, and the price of gas increased significantly, an agreement might allow the employer to
increase the mileage allowance for a time and avoid any possible estoppel arguments later.
Estoppel does not mean that a party will be prevented from enforcing the terms of the
agreement indefinitely. An estoppel will cease at the next round of contract negotiations if
the union or the employer advises the other that it will rely on the strict terms of the agreement
in the future. The party that has previously relied on the variation from the collective
agreement will have to negotiate a change to the agreement. If it fails to do so, it will be
deemed to have agreed to the application of the agreement as written.

In your own words, describe the concept of "estoppel" and what significance it

has on the change process in a unionized work setting. (100 word target).

In: Operations Management