Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

MariaKilsved/GroupAssignment2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GroupAssignment2

Objective

You are going to code a simple deck of playing cards, practicing Properties, Constructors and switch expressions.

You don’t need to change code in Main() the but you need to write the code requested in DeckOfCards.cs and PlayingCards.cs. Running the program, it should:

  • Randomly generate 3 cards using the using the default constructor (the one without parameters). Print them out
  • Initiate a fresh deck of cards with 52 Cards. Print out the deck
  • Shuffle the deck. Print out the shuffled deck

Mandatory:

  • Work in your assigned group
  • Clone the repository https://github.com/smarlen/GroupAssignments.git
  • Complete the code in the methods PlayingCard.FaceOrValue, PlayingCard.PlayingCard(), DeckOfCards.Shuffle(), DeckOfCards.FreshDeck(), DeckOfCards.DeckOfCards ()

Challenge (if you like to try):

  • Modify the code in DeckOfCards and in DeckOfCards.GetTopCard() to return the top card of the deck and reduce the number of cards in the deck with one.
  • Test it with the code in Main() (which are commented out) to reduce three cards from the deck, print them out to verify they are from the top of deck.
  • Print out the new deck which should now contain 49 cards

Report:

  • Hand in your group work with the names and participants in the group mentioned as comments in the code at the deadline given. Hand in either as zip file or as a git link repository.
  • Each member in the group, send me a short separate email on your experience of the groupwork

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages