Assume you want to design a DecisionMaker class which decides if a product should be repaired under warranty. The class has properties for NumYears the person has owned the item, the life of the warranty, and amount paid for the warranty. The class also has a GetDecision( ) method whether the item is a warranty repair item.
GetDecision() receives no parameters. However, it determines a warranty repair worthiness score using this formula:
Score= AmountPaid * YearsOwned/Life
If the score is less than 100, GetDecision assigns a value of false to a Boolean. If the score is greater than or equal to 100, GetDecision assigns a value of true to a Boolean. Then GetDecision sends the Boolean back to the calling program.
Assume you also have a form with 3 textboxes for receiving the numyears, life and amount paid, a button and a label.
A. Create the class diagram for the DecisionMaker Class (you can type it into the textbox)
B. Create the pseudo code for the GetDecision() method
C. Create the pseudo code for the button_click event
Recently Asked Questions
- Please refer to the attachment to answer this question. This question was created from Discussion – MMHA-6400-2,Healthcare Financial Mgmt.2016 ....
- What term refers to a unilineal descent group whose members claim , but can not demonstrate , common descent from an apical ancestor ?
- From the sociological perspective , what causes people to engage in deviant behavior ?