Skip to content

SamyWarnants/CPPfinaleopdrachtSamyWarnants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Uno Game - Object-Oriented Programming and other mini codes!

Goals Evaluation

Useful and Correct Class

  • Explanation: The Card, Deck, Player, and UnoGame classes serve distinct purposes, encapsulating related functionalities.

Useful and Correct Abstraction

  • Explanation: The code abstracts the concepts of cards, decks, players, and the Uno game, providing clear and high-level interfaces.

Useful and Correct Encapsulation

  • Explanation: Member variables are appropriately encapsulated within classes. The internal details of each class are hidden, and access is controlled through public interfaces.

Useful and Correct Inheritance

  • Explanation: No explicit use of inheritance is present, and this is intentional. The design relies more on composition and abstraction without relying on an inheritance hierarchy.

Useful and Correct Polymorphism

  • Explanation: Polymorphism is achieved through the virtual function displayCard() in the Card class, allowing for different implementations in derived classes.

Useful and Correct Object Composition

  • Explanation: The Deck class composes a vector of Card objects, and the Player class contains a vector of cards. This composition allows for building complex structures.

Useful and Correct Base Class

  • Explanation: The Card class serves as a base class for different types of cards, providing a common interface for operations like displayCard().

Useful and Correct Abstract Base Class

  • Explanation: The Card class is designed as an abstract base class with a pure virtual function, making it an abstract class.

Useful and Correct Virtual Function

  • Explanation: The displayCard() function in the Card class is declared as a virtual function, allowing for polymorphic behavior in derived classes.

No Mistake in Object-Oriented Programming

  • Explanation: The code follows fundamental principles of object-oriented programming, including encapsulation, abstraction, and polymorphism. No significant mistakes are observed.

Crossbox: [ ] Completed / [x] Not Completed

Project Requirements

Aanvullend

  • Explanation: The main function is clean, with nothing that should be in a class.
  • Explanation: No globals are used; instead, statics are used where needed.
  • Explanation: Correct protections are in place to control access to member variables and functions.
  • Explanation: The code follows a clean and uniform code style with good function naming and comments.
  • Explanation: Header files are separated for each class.
  • Explanation: One complete project that compiles and does not crash.
  • Explanation: The project is fully working.
  • Explanation: There are sufficient git commits (approximately weekly).
  • Explanation: Correct files are on git.
  • Explanation: There is a working build manual as a readme on GitHub, and the project is possible to build from scratch on a clean PC.

OOP

  • Explanation: There are at least 2 default constructors.
  • Explanation: There are at least 2 parameterized constructors.
  • Explanation: There are at least 2 copy constructors.
  • Explanation: There are at least 2 destructors.
  • Explanation: Member initialization in constructors is present.
  • Explanation: Constructor forwarding is used.
  • Explanation: Useful proven (dynamic) polymorphism is achieved.
  • Explanation: "this" is used where necessary for clarity.
  • Explanation: Useful member function is present.
  • Explanation: Default values in function definition are used.
  • Explanation: Useful member variable is present.
  • Explanation: Useful getters and setters for member variables are implemented.
  • Explanation: Inline function is used appropriately.
  • Explanation: Useful template function or class is implemented.
  • Explanation: Useful friend function or class is implemented.

C++

  • Explanation: Everything is in one or more self-made namespaces.
  • Explanation: There are 2 useful unsigned chars or other memory-efficient types.
  • Explanation: There are at least 4 useful const references for variables.
  • Explanation: There are at least 4 useful const references for functions.
  • Explanation: There are at least 4 useful bool variables.
  • Explanation: Dynamic memory allocation (new) is used.
  • Explanation: Dynamic memory removal (delete) is used.
  • Explanation: There are 2 useful (modern) call-by-references.
  • Explanation: Useful string class usage is present.
  • Explanation: Useful container class is used.
  • Explanation: nullptr is used where appropriate.
  • Explanation: (Modern) file I/O is used.
  • Explanation: Exception handling is appropriately implemented.
  • Explanation: Lambda function is used where appropriate.
  • Explanation: Threads are used where appropriate.

Uitbreiding

  • Explanation: A useful Qt class is used.
  • Explanation: Signals/slots are used where appropriate.
  • Explanation: Test-driven development is followed, with a written test plan or unit tests.
  • Explanation: A bug ticket is reported on another project.
  • Explanation: An external library (not Qt) is used where appropriate.
  • Explanation: The project communicates with hardware (e.g., UART, BT).
  • Explanation: A nice extra is implemented that deserves grading.

Setup guide

  1. Install the QT IDE with the following (link)[https://www.qt.io/download] make sure you install the open source version since other versions will require payment to continue.
  2. Once this is done use the account you made (in the previous step an account was required to download the program if this was not the case make an account and login inside the maintainance tool)
  3. After that you will be given 3 options for what you would like to do. The one we will select is "add or remove components" then you will be able to select what you would like to install. The following options are the one I have installed on my systems. image
  4. Once the QT installation is complete you can clone the project to your own directory (If you don't know how this works you can follow this guide on how to clone repositories.
  5. When this is complete go back to QT and select open project. Go to the folder where the code is cloned into and then open it inside qt. (Make sure that run in terminal is enabled in all projects because they require user input and the calculator code will otherwise not work).

Found a bug!

A bug was found inside my code but also in Ceyhans code. I have discovered that in my calculator code that it had 2 different times it asked for what operation needs to be done.

About

Cpp opdrachten

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published