A UML diagram for the card game Go Fish is given below:
The UML Diagram-------------------------
| Player |
-------------------------
| -hand: List<Card> |
| -score: int |
| +getPlayerName(): String|
| +getHand(): List<Card>|
| +getScore(): int |
| +addCardToHand(card: Card): void|
| +removeCardFromHand(card: Card): void|
| +addToScore(points: int): void|
| +hasCard(rank: Rank): boolean|
| +getMatchingCards(rank: Rank): List<Card>|
| +askForCard(player: Player, rank: Rank): List<Card>|
| +goFish(deck: Deck): Card|
-------------------------
| ^
| |
|------------------|
| |
------------------------- |
| Card | |
------------------------- |
| -rank: Rank | |
| -suit: Suit | |
| +getRank(): Rank | |
| +getSuit(): Suit | |
| +toString(): String | |
| +equals(other: Object): boolean|
| +hashCode(): int | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Rank | |
------------------------- |
| ACE | |
| TWO | |
| THREE | |
| FOUR | |
| FIVE | |
| SIX | |
| SEVEN | |
| EIGHT | |
| NINE | |
| TEN | |
| JACK | |
| QUEEN | |
| KING | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Suit | |
------------------------- |
| CLUBS | |
| DIAMONDS | |
| HEARTS | |
| SPADES | |
------------------------- |
| ^
| |
|------------------|
| |
------------------------- |
| Deck | |
------------------------- |
Read more about UML diagram here:
https://brainly.com/question/13838828
#SPJ1
Shady lady Mortgage Company requires an insurance down payment on all its mortgages based on the
following schedule:
5% on the first $25,000
3% on the remaining balance Develop the logic required for a program to computer the down payment requires by the mortgagee and list the mortgagee's account number and name. The input data record will contain name, account number,
and mortgage amount. Use functions. Add comments and use the output formatting for the
currency.
An Illustrative Depiction and Programming Sample in Python:
The Python descriptionDefine a function to compute the premium for an insurance down payment related to the sum of one's mortgage.
In this part,
a. Create an intial value of 0.
b. Should the amount obtained be less than or equal to $25,000, then calculate 5% of the mortgage as the down payment.
c. Conversely, should the mortgage be more than $25,000, use the formula provided -- 5% of $25,000 and an additional 3% on any additional funds over the set amount --for down payments.
Now, within the main function:
a. Procure all required data so as to enter each user’s name, account number, and procedure for mortgaging funds for measurement in said equation.
b. Thereafter contact the aforementioned calculator of the insurance down payment, being sure to provide it with the sum of the mortgage as input, from which it will generate the final sum required for that particular premium.
c. Last, format the output displayed for the customer in currency mode—listing their account number, given name, and accurate representation of the needed down payment.
Read more about mortgage here:
https://brainly.com/question/1318711
#SPJ1