Let X~Bin(100,0.5).
Show all workings in details
a) Find the probability that X is a perfect square.
b) Find the probability that X is a greater than 60.
c) Find the expected value and variance of X.
In: Math
Suggestions on how a company can prevent bias and manipulation using the performance measurement tools, residual income, return of investment, and economic value added.
In: Operations Management
A protein 13.2 Weight-percent N. A .500 ml Aliquot of protein solution was digested and liberated NH3 was distilled into a beaker containing 10.0mL of .01380 M HCl. Unreacted HCl needed 1.54 mL of .0108 M Ba(OH)2 for titration. What was the concentration of protein (mg/mL)
In: Chemistry
Person class
You will implement the Person Class in Visual Studio. A person
object may be associated with multiple accounts. A person initiates
activities (deposits or withdrawal) against an account that is
captured in a transaction object.
A short description of each class member is given below:
Person
Class
Fields
- password : string
Properties
+ «C# property, setter private» IsAuthenticated :
bool
+ «C# property, setter absent» SIN : string
+ «C# property, setter absent» Name : string
Methods
+ «Constructor» Person(name : string, sin :
string)
+ Login(password : string) : void
+ Logout() : void
+ ToString() : string
Fields:
⦁ password – this private string field represents the
password of this person.
(N.B. Password are not normally stored as text but as a hash value.
A hashing function operates on the password and the result is
stored in the field. When a user supplies a password it is passed
through the same hashing function and the result is compared to the
value of the field.).
Properties:
⦁ SIN – this string property represents the sin number
of this person. This getter is public and setter is absent.
⦁ IsAuthenticated – this property is a bool
representing if this person is logged in with the correct password.
This is modified in the Login() and the Logout() methods. This is
an auto-implemented property, and the getter is public and setter
is private
⦁ Name – this property is a string representing the
name of this person. The getter is public and setter is
absent.
Methods:
⦁ public Person( string name, string sin ) – This
public constructor takes two parameters: a string representing the
name of the person and another string representing the SIN of this
person. It does the following:
⦁ The method assigns the arguments to the appropriate
fields.
⦁ It also sets the password to the first three letters
of the SIN. [use the Substring(start_position, length) method of
the string class]
⦁ public void Login( string password ) – This method
takes a string parameter representing the password and does the
following:
⦁ If the argument DOES NOT match the password field, it
does the following:
⦁ Sets the IsAuthenticated property to false
⦁ Creates an AccountException object using argument
AccountEnum.PASSWORD_INCORRECT
⦁ Throws the above exception
⦁ If the argument matches the password, it does the
following:
⦁ Sets the IsAuthenticated property is set to
true
This method does not display anything
⦁ public void Logout( ) – This is public method does
not take any parameters nor does it return a value.
This method sets the IsAuthenticated property to false
This method does not display anything
⦁ public override string ToString( )– This public
method overrides the same method of the Object class. It returns a
string representing the name of the person and if he is
authenticated or not.
ITransaction interface
You will implement the ITransaction Interface in Visual Studio. The
three sub classes implement this interface.
A short description of each class member is given below:
ITransaction
Interface
Methods
Withdraw(amount : double, person : Person) :
void
Deposit(amount : double, person : Person) : void
Methods:
⦁ void Withdraw(double amount, Person person).
⦁ void Deposit(double amount, Person person).
Transaction class
You will implement the Transaction Class in Visual Studio. The only
purpose of this class is to capture the data values for each
transaction. A short description of the class members is given
below:
All the properties are public with the setter absent.
Transaction
Class
Properties
+ «C# property, setter absent » AccountNumber :
string
+ «C# property, setter absent» Amount : double
+ «C# property, setter absent» Originator :
Person
+ «C# property, setter absent» Time : DateTime
Methods
+ «Constructor» Transaction(accountNumber : string,
amount : double, endBalance : double, person : Person, time :
DateTime)
+ ToString() : string
Properties:
All the properties are public with the setter absent
⦁ AccountNumber – this property is a string
representing the account number associated with this transaction.
The getter is public and the setter is absent.
⦁ Amount – this property is a double representing the
account of this transaction. The getter is public and the setter is
absent.
⦁ Originator – this property is a Person representing
the person initiating this transaction. The getter is public and
the setter is absent.
⦁ Time – this property is a DateTime (a .NET built-in
type) representing the time associated with this transaction. The
getter is public and the setter is absent.
Methods:
⦁ public Transaction( string accountNumber, double
amount, Person person, DateTime time ) – This public constructor
takes five arguments. It assigns the arguments to the appropriate
fields.
⦁ public override string ToString( ) – This method
overrides the same method of the Object class. It does not take any
parameter and it returns a string representing the account number,
name of the person, the amount and the time that this transition
was completed. [you may use ToShortTimeString() method of the
DateTime class]. You must include the word Deposit or Withdraw in
the output.
A better type would have been a struct instead of a class.
ExceptionEnum enum
You will implement this enum in Visual Studio. There are seven
members:
ACCOUNT_DOES_NOT_EXIST,
CREDIT_LIMIT_HAS_BEEN_EXCEEDED,
NAME_NOT_ASSOCIATED_WITH_ACCOUNT,
NO_OVERDRAFT,
PASSWORD_INCORRECT,
USER_DOES_NOT_EXIST,
USER_NOT_LOGGED_IN
The members are self-explanatory.
AccountException class
You will implement the AccountException Class in Visual Studio.
This inherits from the Exception Class to provide a custom
exception object for this application. It consists of seven strings
and two constructors:
AccountException
Class
→ Exception
Fields
Properties
Methods
+ «Constructor» AccountException(reason :
ExceptionEnum)
Fields:
There are no fields
Properties:
There are no properties
Methods:
⦁ AccountException( ExceptionEnum reason )– this public
constructor simply invokes the base constructor with an appropriate
argument. Use the ToString() of the enum type.
In: Computer Science
M = [4,3,7,6,5,2,4,1,0,7]
Construct a binary search tree for M. Then traverse it (post order)
In: Computer Science
Written in C++. I need to create function printShort exactly like this description: "printShort ( ) - prints the Date in the format m/d/yy (no leading zeros for month and day, and two last digits for year with leading zeros (use fill digit ‘0’) if necessary). Use the accessors to get the values of the data members. " Right now it is showing the correct output for month and day, but still printing a 4 digit year. How would I only print the last two digits of the variable year? For example, with March 31, 2020 the year's value is set to '2020', but it should be written 3/31/20
Function code:
void Date::printShort(){
cout<<getMonth()<<"/";
cout<<getDay()<<"/";
cout<<setfill('0')<<setw(2)<<getYear();
}//end printShort
In: Computer Science
1. Characteristics of strategic decisions
2. 5 generic competitive strategies (explain)
3. what's a business model and what are its components?
4. when does a strategy works best, when does low-cost, differentiator, focused, work best?
5. 5 external competitive pressures, come from 5 sources?
In: Operations Management
1. Discuss the importance of purchasing and what to consider in
selecting suppliers.
2. Describe inventory and how to maintain effective contro
In: Operations Management
Q1. [10 pts, 1pt each] General knowledge of Computer, True or False (fill in T or F)
In: Computer Science
Python Questions:
Q1. list_1= ['wind', 'spring', 'summer', 'purse', 'great', 'sports']
Use re.search() in the re package and list comprehension to find all words in list_1 that does not contain the letter "r".
Q2.
str_1= '''I live in a room by the sea,
where the view is great and the food is free.
Some of the tenants come and go.
Some I eat, if they're too slow.
One end of me is firmly locked.
The other end just gently rocks.
I live in a room by the sea.
It's perfect for an anemone. '''
Use re.search() in the re package to find all lines that does not
start with the letter "s", "S", or "I".
Q3. list_1= ['attitudes', 'ab\nchild', '2!apologies', 'echess',
'fly\n', 'cheer']
Use list comprehension and functions in re package to filter all
elements that start with "ch" or end with "es".
Q4. Remove everything from the first occurrence of "e" till end of the string, using the function .sub() from the "re" package
str_1 = 'Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.'
In: Computer Science
which balanced scoreboard perspective most closely aligned with McDonald handling of its supply chain, based on the case?
In: Operations Management
What are the main reasons Pepsi Co acquire California Pizza Kitchen? How would you evaluate such decision? Was the acquisition successful? Why or why not?
In: Operations Management
The below mentioned figure shows a General diagnosis flowchart
for troubleshooting HP servers. Use
the flowchart to create a C++ program that leads a person through
the steps of fixing a bad HP server.
Here is an example of the program’s output (following one of the
flow):
Starting General Diagnosis Program.
Recoding symptoms information - DONE.
Rebooting server to see if condition still exists - DONE.
Is this a newly installed server? yes [enter]
Please reseat any components that may have come loose during
shipping - DONE.
Rebooting the server - DONE.
Does the condition still exist? no [enter]
Recording all actions taken for future - DONE.
Congratulations, your server problems are solved.
Notice the program ends as soon as a solution is found to the
problem.
In: Computer Science
A situation in which the source of information is more sensitive than the information itself. Explain why the sum of sensitive data might also be sensitive.
In: Computer Science
Some companies do not include educational benefits in their benefits plans. Discuss reasons why this may be the case. If your employer does offer tuition reimbursement, share your thoughts with the class on the value of this benefit. Also, what percentage of the employees do you believe typically take advantage of it? Please do not share anything that would be confidential in nature.
In: Operations Management