Reference no: EM131305107
Object-Oriented Programming Assignment
Introduction -
"A logical matrix or (0, 1) matrix is a matrix with entries from the Boolean domain B = {0, 1}. Such a matrix can be used to represent a binary relation between a pair of finite sets. If R is a binary relation between the finite indexed sets X and Y (so R ⊆ X×Y), then R can be represented by the logical matrix M whose row and column indices index the elements of X and Y, respectively, such that the entries of M are defined by:

In order to designate the row and column numbers of the matrix, the sets X and Y are indexed with positive integers: i ranges from 1 to the cardinality (size) of X and j ranges from 1 to the cardinality of Y.
Define a class (called LogMat) to represent logical matrix of any binary relation as explained previously.
A. The class has three member variables: matrix (as dynamic 2-D array), rowSize and columnSize.
B. Provide a default constructor with default parameter to initialize an empty matrix to 0 with a maximum of 10 X 10.
C. Overload the stream extraction (>>) to read the R from input file where the format of the input file as {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)} for each R.
D. Overload the stream insertion (<<) to display the matrix on the screen.
E. Overload the (==) operator to check if two sets are equal.
F. Overload the plus (+) operator to return the combination between two sets. For example if A and B are sets then A + B should return a set that contains all the elements in either or both of the sets.
G. Provide functions that should/must be in the class.
H. Write main program that:
i. Create an input file for each of the below relations:
- aRb holds if and only if a divides b evenly, with no remainder
- aRb holds if and only if the sum of a+b is an even number.
ii. Each set should be in format as mentioned in part C.
iii. Create at least one object for each relation.
iv. Test the operators the overloaded operators.
Write a program that simulates multiple games of blackjack
: Blackjack (twenty-one) is a casino game played with cards. The goal of the game is to draw cards that total as close to 21 points as possible without going over. All face cards count as 10 points, aces count as 1 or 11, and all other cards count t..
|
Call option on the stock that has a strike price
: The current price of a stock is $22. In 1 year, the price will be either $28 or $15. The annual risk-free rate is 6%. Find the price of a call option on the stock that has a strike price is of $25 and that expires in 1 year.
|
Determines if the value is prime
: Write a program that gets a starting value from the user and then prints the Syracuse sequence for that starting value.
|
Black-scholes option pricing model-what is options value
: Black-Scholes Model Assume that you have been given the following information on Purcell Industries: Current stock price = $15 Strike price of option = $14 Time to maturity of option = 6 months Risk-free rate = 8% Variance of stock return = 0.11 d1 =..
|
Define a class to represent logical matrix
: COMP3200: Object-Oriented Programming Assignment. Define a class (called LogMat) to represent logical matrix of any binary relation as explained previously. The class has three member variables: matrix (as dynamic 2-D array), rowSize and columnSize
|
Find the price of a call option on the stock
: The current price of a stock is $15. In 6 months, the price will be either $18 or $11. The annual risk-free rate is 7%. Find the price of a call option on the stock that has a strike price of $12 and that expires in 6 months.
|
What is the exercise value of call option-option time value
: A call option on the stock of Bedrock Boulders has a market price of $7. The stock sells for $29 a share, and the option has a strike price of $26 a share. What is the exercise value of the call option? What is the option's time value?
|
Find a basis for the orthogonal complement
: find a basis for the orthogonal complement to the row space; choose a convenient vector in both of these spaces and verify/demonstrate the orthogonality.
|
Discuss two different roles that project managers can play
: Discuss at least two different roles that project managers can play in organizational leadership. Describe at least three human resource factors that affect project management.
|