![]() |
.. (לתיקייה המכילה) | |
How to set and verify the new g++ version for the assignment? | |
In order to use gcc/g++/gfortran 4.7.1, you should run first: source /usr/local/gcc4.7/setup.csh # for CSH and TCSH or: . /usr/local/gcc4.7/setup.sh # for BASH and SH verify version by: gcc --version gcc (GCC) 4.7.1 Please note that this change will expire after you log out. Refer to tutorial #2 to see how to make this permanent. |
How do I create get C++11 to work in Eclipse? | |
Go to Project | Properties | C/C++ Build. Choose C++ Compiler, then Dialect then Language standart and change it to ISO C++11 If your eclipse version is not the newest, you might not have this option. In this case, Add the -std=c++11 flag by going into Project | Properties | C/C++ Build. Choose C++ Compiler, Settings and add under miscellaneous "-std=c++11". In addition, to make Eclipse understand C++11, go to Discovery Options (Also under C/C++ Build). Make sure "C++ Compiler" is chosen and under "Compiler invocation arguments" add "-std=c++11" in the end of this line (with a space before ti of course). |
Can we change the provided header files? | |
Yes, you can change the files, but you cannot change any of the method signatures, class names, etc. That is, you can add code (new methods, new variables), but provided code should not be changed. Also, you should not change the access modifiers (private\protected\public) of the given code. |
What is the purpose of the static "ACE_REPRESENTATION" field? | |
This was left in the Card class by mistake. You don't have to use or leave this field in your code. An updated file now appears in t2 |
Dry section - Question 2: | |
No. The solution for each section should be direct, without unnecessary code. |
Can we change the file Exception.h? | |
No, and you should not submit this file. If you want to use other exceptions, define them locally. Please note that out tests do not expect any other exception, so if you decide to throw another exception, you must also catch it. |
Should the code also support comparisons between a card and a deck (card <= deck)? | |
Yes, as a single card may be interpreted as a deck as well. |
Card: Does the comment about upper case and lower case letters refer to the suit as well? | |
Yes, JH, Jh, jH, jh are all legal cards. |
Can we use std::stack? | |
Yes, but not in the second part (generic map), where you are not allowed to use STL. |
Card << operator: | |
Use 1 for Ace. Use capital letters whenever there is a choice (i.e. J Q K H D C S). |
Are we expected to use our own map in the third part? | |
Yes |
In the wet part: can we add additional public methods which are not required in the exercise? (e.g. adding methods to Card to be used by CardDeck) | |
Yes, but you are not allowed to assume the existence of these methods in your tests. This means that the test your write should only assume the existence of the methods defined in the exercise. |
Card: Can we implement an empty contructor for Card? | |
Yes |
CardDeck: What should be the result of using the input operator on a non-empty deck? | |
The final deck should be the one that was read from the input, regardless of the cards that it previously contained. |
Can we use std::vector? | |
Yes, but not in the second part (generic map), where you are not allowed to use STL. |
What should be the name of the tests directory? It is written as "tests" in one location and as "test" in another | |
use tests |
Where should we write our implementations? | |
In the cpp file, except for templates. |
how to define NULL? | |
please use #include <cstdlib> |
Is it possible that some aces will have the value of 1 and others will have the value 11? | |
Yes. The whole sum should obey the two rules described in the exercise. |
CardDeck: When reading a deck, can we assume a deck is in a single line? | |
No. One deck may appear in several lines: 3 AH 2d 3c is valid. Also, one line can have multiple decks: 3 AH 2d 2c 2 AH 2d |
Do we need to implement a const_iterator as well? | |
This was not required. You may assume that our map tests will not perform any iteration on a constant map. However, implementig a const_iterator (if your design requires it) is not a mistake. |
Map: Can we assume that KeyType or ValueType have a default constructor? | |
No. Please make sure you do not make that assumption, as it may prevent your code from compiling. |
Can I use input/output files for my tests? | |
Yes, If you use input and output files, please create an input and output directory inside your tests. |
Can I assume a default ctor for CompareFunction? | |
Yes |
Calculated player strategy: There are two cases, and after them it is written that if the player doesn't have an ace and has a value of 17, he will stand. Which case does this line refer to? | |
The second one. There was an identation problem. If the player doesn't have an ace (of value 11), and the hand value is 17 or more, the player will stand. |
There is an exception called "PlayerAlreadytExistException". It has an extra "t". | |
This is a typo of course, but please use this name and do not remove the extra t. Note that you should not submit the file Exceptions.h |
Dry question: can we use the algorithm header? | |
No. |
do we need to make test units for all the classes we do ? | |
Although it is recommended to test all classes, you are only required to submit unit tests for the classes described in the assignment. That includes, Blackjack, MtmMap, CardDeck and Card. |
After the players hits and gets a card, what happens? | |
The turn passes to the next player. Only after all the players (that are still in the game) made their move, the player is asked again. |
Should the line #pragma once be in BlackJack.h? | |
No, it was removed. Please use the updated file. |
Can we assume that the deck is never empty in the middle of the round? | |
Yes, as long as you perform the check that the deck has at least one instance of each possible card in the beginning of the round. |
Dry question 1: Does the function object receive an element of the generic collection in its implementation of ()? | |
No. The function object should be used to test a condition of a collection, not a single element. |
Dry part, second question: Can we change the given print method in any of the sections? | |
No. |