Write a C# code that creates objects and classes with their
member functions for KrisFlyer,
a Singapore Airlines Loyalty program. You are asked to write an
inheritance hierarchy discount
system that benefits KrisFlyer members program to calculate their
profit.
A brief about KrisFlyer is that it is useful for those who fly
on Singapore Airlines (its
partners like Virgin Australia and Air New Zealand) frequently.
KrisFlyer miles can be earned
through credit cards, flying and bonus miles promotions. The miles
can be redeemed for award
flights in all categories. It has three types of memberships namely
Basic, Elite Silver and Elite
Gold. When registered for the first time, all the customers get
instant access to the basic
membership level of KrisFlyer. In 2020, Singapore Airlines
offers a flat 10%, 20% and 30%
discount to its Basic, Elite Silver and Elite Gold members
respectively for all services provided.
Customers without membership receive no discount. The students have
to implement basic OOPs
concepts such as inheritance, polymorphism and encapsulation.
Inheritance
Base class: Create an inheritance hierarchy to represent various
types of memberships. Use
KrisFlyer as the base class of the hierarchy, then include derived
classes Basic, Elite Silver and
Elite Gold that deriver from KrisFlyer. Base class KrisFlyer should
have data members
representing name, membership, flight, price for flight, number of
passengers for the members.
The constructor should initialize these data members. Ensure that
flight price and number of
passengers contain positive values. KrisFlyer should include a
public member function
calculateCost() that returns a double indicating the cost by
multiplying the price for flight by the
number of passengers.
Derived class: Basic, Elite Silver and Elite Gold should inherit
the functionality of base
class KrisFlyer, but also include a data member that represents a
discount that the reward program
has offered recently. All the derived class’s constructor should
receive a value to initialize this data
member. In 2020, Singapore Airlines offers a flat 10%, 20% and 30%
discount to its Basic, Elite
Silver and Elite Gold members respectively for all services
provided. All the derived members
should redefine calculateCost() so that it applies the discount to
the booked flights. It shall compute
the total bill if a customer purchases y tickets for a price of $x
for each flight for their visit using
Krisflyer.
Your system shall consist of four classes: 1. KrisFlyer (base
class), derived classes
including Basic, Elite Silver, Elite Gold.
Polymorphism
Implement a method display() that displays all the records of the
system. Another form of
the method display(string cust_name) that displays records related
to the customer name passed in
the argument.
Encapsulation
Define the instance variables private/ public so that they
cannot/can be accessed from
outside the class. Implement getter and setter method for the
variables in the program.
Write a program that implements basic Object-oriented concepts
including encapsulation
polymorphism and inheritance. Also, the program is expected to get
the basic input from the user
based on either console/Desktop.
The student is expected to do the following tasks:
1. Draw the class diagram of the given scenario
2. Write the c# classes with suggested data members and
functions
3. Write the base and derived classes for implementing inheritance
in the program.
4. Implement polymorphism and encapsulation to check for
accessibility of data members
and different form of the data member
5. Write the main logic that takes input from the user members with
their bookings
6. Write the code to display the output as displayed (it is a
sample)
Expected output
The given output is a sample. The student is free to use
creative ideas to display the output of the
program. It needs to be an interactive session where the user feeds
in dynamic information.
Sample
KrisFlyers Reward Discount system
Basic 10%
Elite silver 20%
Elite gold 30%
Hello, Input based on your requirement
1. To input new entry
2. Display a single record:
3. Display all records
4. Exit
1
Enter the name of the customer : XYZ
Enter the membership type : Basic
Enter the price for flight in dollars ($): 1200
Enter the number of passengers : 2
Hello, Input based on your requirement
1. To input new entry
2. Display a single record:
3. Display all records
4. Exit
2
Enter the name of the customer
XYZ
| Name | Price | No | Total | discount | Discounted Price |
| XYZ | $1200 | 2 | $2400 | 10% | $2160 |
Hello, Input based on your requirement
1. To input new entry
2. Display a single record:
3. Display all records
4. Exit
3
| Name | Price | No | Total | discount | Discounted Price |
| XYZ | $1200 | 2 | $2400 | 10% | $2160 |
| ABC | $1000 | 1 | $2000 | 10% | $1800 |
Code related Guidelines
1. Your c# console-based application should include the
following:
a. The code should have a consistent, professional and
well-organized appearance.
b. Carefully chosen, meaningful identifier names
c. Code is well organized: clear, simple, & DRY (Don't repeat
Yourself)
d. Thoughtful comments, where needed, expressed in concise, precise
English.
e. Code should compile without errors
2. The developed system takes input and handles the error in
friendly manner.
3. Your project must adhere to OOPS concepts with implementation
guidelines including
modularity, reusability, extensibility, maintainability and
adaptability.
The c# console-based application developed must be submitted in
a zip folder on the LMS
in the available link. The zip folder should include:
o A document that consists of introduction, requirements, proposed
class diagram
with the attributes, screen shots and output with references.
o The c# project folder
o A readme.txt file, which include your information.
In: Computer Science
QUESTION 2:
S.B.Consult Ltd, recognized as the leader in hospital supplies, has received an invitation to supply FBC, ECG, and dental machines to Justab Hospital in Kasoa. The contract will be for 10 years, and management is considering appraising the investment to enable them present their proposals for the contract. The following information was extracted from the recently published accounts of S.B. Consult Ltd.
|
GH¢ ‘000 |
|
|
Equity Shares (1,000,000 shares) |
70,000 |
|
15% Preference shares |
50,000 |
|
10% (Bonds irredeemable) |
30,000 |
|
Total |
150,000 |
The Treasury unit of S.B.Consult Ltd has estimated that it will require GH¢ 10 million to finance the new project. The total amount would be raised through 10% Irredeemable bonds at the current market price. The cost of Preference shares and Bonds will not change but equity shareholders will demand an increase of 20% on the current cost of equity.
S.B.Consult Ltd has a beta of 0.8, the market risk premium for the steel industry is 6.25%, and the Government of Ghana Bond rate is 20%. The current market price for Irredeemable Bonds of GH¢1,000 nominal value is GH¢850.
S.B. Consult Ltd’s dividend policy is to pay constant dividend and this policy will not change into the foreseeable future. The recent dividend paid was GH¢20 per share. S.B. Consult Ltd is a Free Zones Company and therefore pays tax at a rate of 8%.
Required:
i) Calculate the current market capitalization of S.B. Consult Ltd.
(Hint: ?=??+ ? (??−??))
QUESTION 3:
Boateng Plaza Ltd, a hotel leisure company, is currently considering taking over a smaller private limited company, Badin Ltd. The board of Boateng Plaza is in the process of making a bid for Badin Ltd but first needs to place a value on the company.
Boateng Plaza has gathered the following data:
|
Year |
2011 |
2012 |
2013 |
2014 |
|
GH¢ |
GH¢ |
GH¢ |
GH¢ |
|
|
Profit after tax |
6,000,000 |
6,200,000 |
6,300,000 |
6,300,000 |
The company’s earnings yield is 12%.
Required:
i) As a Finance Manager, calculate the value of the company based on the present value of expected earnings.
ii) Explain THREE problems associated with using P/E method for valuing firms.
It's a complete question, Sir
In: Finance
Analyze the major connections between liability of professionals, insurance policy coverage, and settlement of claims due to health care liability issues. Consider the concept of insurance coverage denial. Ascertain the manner in which such denial is built on the limitation clauses and conditions set forth by the insurance provider.
In: Operations Management
Show to use ode45 built-in function in MATLAB to solve the following ODE problem:
dydx=x^2 / y y(0)=2
Calculate y(x) for 0 ? x ? 20 and compare the results to analytical solution y = sqrt((2x^3 / 3) + 4)
In: Mechanical Engineering
Use R functions search and objects to find all possible R built-in functions related to exp distribution. rexp should be one of them. dexp is another one. Explain what the following two lines of codes do: curve(dexp, from=0, to=4)
In: Statistics and Probability
Consider a 5-year bond paying 6 percent coupon annually. The yield is 10 percent. Find its Macaulay duration (do not use the Excel built-in function). If the interest rate rises by 10 basis points, what is the approximate percentage change in the bond price?
In: Finance
Briefly answer the following:
a. BlueNile, is a diamond online retailer, discuss how has BlueNile
built its supply chain to keep costs low?
b. List 2 retailers that build a supply chain to keep cost
low-saved millions then discuss how they did it?
In: Economics
in c++, without using any built-in random library already exist, instead,write your own function to generate random char from a list of:
10 letters T
10 letters H
10 letters A
10 letters N
10 letters K
In: Computer Science
Please Use your keyboard (Don't use handwriting)
Stat
(1)
An insurance company believes that people can be divided into
two classes: those who are an accident prone and those who are not.
The company’s statistics show that an accident-prone person will
have an accident at some time within a fixed 1-year period with
probability .4, whereas this probability decreases to .2 for a
person who is not accident-prone.
(i) If we assume that 30 percent of the population is accident
prone, what is the probability that a new policyholder will have an
accident within a year of purchasing a policy?
(ii) Suppose that a new policyholder has an accident within a year
of purchasing a policy. What is the probability that he or she is
accident-prone?
(2)
Two boxes containing marbles are placed on a table. The boxes
are labeled B1 and B2. Box B1 contains 7 green marbles and 4 white
marbles. Box B2 contains 3 green marbles and 10 yellow marbles. The
boxes are arranged so that the probability of selecting box B1 is
1/3 and the probability of selecting box B2 is 2/3 FATIMAH is
blindfolded and asked to select 3 marbles. She will win a color TV
if she selects a green marble.
(i) What is the probability that FATIMAH will win the TV (that is,
she will select a green marble)?
(ii) If FATIMAH wins the color TV, what is the probability that the
green marble was selected from the first box?
(3)
One-half percent of the population has CORONA Virus. There is a
test to detect CORONA. A positive test result is supposed to mean
that you have CORONA but the test is not perfect. For people with
CORONA, the test misses the diagnosis 2% of the times. And for the
people without CORONA, the test incorrectly tells 3% of them that
they have CORONA.
(i) What is the probability that a person picked at random will
test positive?
(ii) What is the probability that you have CORONA given that your
test comes back positive?
(4)
A device is composed of two components, A and B, subject to
random failures. The components are connected in parallel and,
consequently, the device is down only if both components are down.
The two components are not independent. We estimate that the
probability of:
a failure of component A is equal to 0.2;
a failure of component B is equal to 0.8 if component A is
down;
a failure of component B is equal to 0.4 if component A is
active.
(a)
Calculate the probability of a failure
(i) of component A if component B is down
(ii) of exactly one component
(b)
In order to increase the reliability of the device, a third
component, C, is added in such a way that components A, B, and C
are connected in parallel. The probability that component C breaks
down is equal to 0.2, independently of the state (up or down) of
components A and B. Given that the device is active, what is
the
probability that component C is down?
In: Statistics and Probability
A portfolio consists of the following four stocks. The dollar investment and beta on each of the stocks are listed below:
| Stock | Investment | Beta |
| A | $200,000 | 0.5 |
| B | $800,000 | 0.8 |
| C | $1,500,000 | 1.5 |
| D | $2,500,000 | -0.25 |
If the expected return on the market is 11% and the risk-free rate
is 4%, what is the portfolio’s required rate of return?
In: Finance