Skip to content

Instantly share code, notes, and snippets.

View waspyfaeleith's full-sized avatar

Sandy McMillan waspyfaeleith

View GitHub Profile

Homework

Tonight's homework is to think about how you would implement the game of 3 Card Brag (the rules of which can be found here: https://en.wikipedia.org/wiki/Three_card_brag ) in Java. Betting is NOT required.

At this stage we are only asking you to PLAN how you would do this i.e. think about which classes you think you would need, any interfaces you would use etc.

Think about the logic you would need to find the winning player and how to compare hands.

Remember to think about what tests you would need.

Fantasy Zoo Manager

Goal: Practice OO modelling in Java (unit tests, no UI)

You have been asked to create a zoo management app so that we can manage our bears, tigers, lions and other animals. The user must be able to add enclosures, add / remove animals, sell animals to other zoos. There should be at least two zoos, and at least three different animal species at each zoo, with different numbers of each species.

Additionally:

  • Animals can be fed so that they stay alive.
  • Animals cannot be placed in the same enclosure if they would eat one and other.

Lab - Rock Paper Scissors

Create a simple Android app to allow the user to play rock, paper, scissors.

They will enter their chosen move by clicking a button, the computer will randomly pick a move to play against them.

The player will see the both the computer's choice, and the result of the game on the screen.

You will need: