Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment Overview Having written a basic class in C++, it's time to spread your wings into multiple classes - a Deck of Cards with 3

image text in transcribed

Assignment Overview Having written a basic class in C++, it's time to spread your wings into multiple classes - a Deck of Cards with 3 suits (U, T, and A), and ranks from 0 to 9. We'll also practice some basics: Makefiles, default parameters, exceptions, regression tests, and (at the bonus level) separate compilation. Deck:Deck em exception Full Credit: Using git (with at least 3 commits) and a Makefile: Card Deck deck: vector +Deck(cards: int-10) . Write the Card class in file suit: Suit Suit rank: Rank Card Card(suit: Suit, rank: Rank) suitD:Suit rank): Rank card to stri suit card.cpp as shown to the right, deal: Card with a regression test in file test card.cpp.1 If the Card constructor's Suit or Rank parameter is invalid, throw a runtime_error. Write the Deck class in file deck.cpp as shown to the right, with a regression test in file test deck.cpp. If Deck::deal is called when the deck is empty, throw a Deck_empty exception. Write an application in file main.cpp that instances and prints out a deck of 20 random cards (you do NOT need to ensure that each card is unique!) datatype Rank rank stri . . Deliver file CSE1325_03.zip to Blackboard. In subdirectory "full credit", include your full git repository, including your most recent files card.cpp, deck.cpp, main.cpp, Makefile, and screenshots main.png (your regression tests and main), and git.png (git log,) Bonus: Using git (3+ additional commits) and a copy of the above code, refactor your classes to use separate compilation by splitting the code into a .h (interface) file and a.cpp (implementation) file. Update your Makefile, regression tests, and application to support separate compilation. In CSE1325_03.zip subdirectory "bonus", include your git repository with updated versions of all source files plus updated screenshots main.png and git.png Assignment Overview Having written a basic class in C++, it's time to spread your wings into multiple classes - a Deck of Cards with 3 suits (U, T, and A), and ranks from 0 to 9. We'll also practice some basics: Makefiles, default parameters, exceptions, regression tests, and (at the bonus level) separate compilation. Deck:Deck em exception Full Credit: Using git (with at least 3 commits) and a Makefile: Card Deck deck: vector +Deck(cards: int-10) . Write the Card class in file suit: Suit Suit rank: Rank Card Card(suit: Suit, rank: Rank) suitD:Suit rank): Rank card to stri suit card.cpp as shown to the right, deal: Card with a regression test in file test card.cpp.1 If the Card constructor's Suit or Rank parameter is invalid, throw a runtime_error. Write the Deck class in file deck.cpp as shown to the right, with a regression test in file test deck.cpp. If Deck::deal is called when the deck is empty, throw a Deck_empty exception. Write an application in file main.cpp that instances and prints out a deck of 20 random cards (you do NOT need to ensure that each card is unique!) datatype Rank rank stri . . Deliver file CSE1325_03.zip to Blackboard. In subdirectory "full credit", include your full git repository, including your most recent files card.cpp, deck.cpp, main.cpp, Makefile, and screenshots main.png (your regression tests and main), and git.png (git log,) Bonus: Using git (3+ additional commits) and a copy of the above code, refactor your classes to use separate compilation by splitting the code into a .h (interface) file and a.cpp (implementation) file. Update your Makefile, regression tests, and application to support separate compilation. In CSE1325_03.zip subdirectory "bonus", include your git repository with updated versions of all source files plus updated screenshots main.png and git.png

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases New Opportunities For Connected Data

Authors: Ian Robinson, Jim Webber, Emil Eifrem

2nd Edition

1491930896, 978-1491930892

More Books

Students also viewed these Databases questions

Question

=+4 What are business risk and financial risk?

Answered: 1 week ago