× Class DateTime Mastermind computer holds Mastermind User Holds Computer Finds Mastermind Engine Publish Subscribe Model Go Back Go Back to Home Page

C++



  • File Name: Class_DateTime | Type of File: Header file (.h) | Size: 30.2 KB


  • This date and time class is a class I wrote for my term project, a model publish and subscribe pattern, in Object Oriented Programming course. Using the system clock, it can gather the time passed since epoch (January 1, 1970) and display it up to millisecond accuracy on various formats. It can be constructed in multiple ways and date and time can be displayed according to the user's choice of accuracy and format. It supports time zone. Custom date and time can be set and dates can be compared, added or subtracted from each other. This class can be useful on many applications that require date, time or clock.





  • File Name: Mastermind_computer_holds | Type of File: Application (.exe) | Size: 2.34 MB




  • File Name: class_Mastermind | Type of File: Header file (.h) | Size: 9.53 KB

  • File Name: main | Type of File: C++ source file (.cpp) | Size: 1.08 KB


  • This is a modified version of the game Mastermind. Instead of colors, numbers are used. In this version user plays against computer. Computer holds a 4 digit number. This number doesn't start with 0 and all of its digits are different from each other. User tries to guess the code that the computer holds. Each time a guess is made, computer gives feedback. If the position and the number is correct it is a [+]. Else if only the number is correct it is a [-] (Colored and white key pegs in Mastermind). More info about Mastermind is available online.





  • File Name: Mastermind_User_Holds_Computer_Finds-MastermindEngine | Type of File: Application (.exe) | Size: 2.42 MB




  • File Name: class_Mastermindv2 | Type of File: Header file (.h) | Size: 76.5 KB

  • File Name: main | Type of File: C++ source file (.cpp) | Size: 640 bytes


  • This is a modified version of the game Mastermind. Instead of colors, numbers are used. In this version computer plays against user. User holds a 4 digit number. This number doesn't start with 0 and all of its digits are different from each other. Computer tries to guess the code that the user holds. Each time a guess is made, user gives feedback. If the position and the number is correct it is a [+]. Else if only the number is correct it is a [-] (Colored and white key pegs in Mastermind). Engine eliminates all the impossible codes based on feedback. Guesses are random within possible codes. It finds the code in maximum 7 tries. More info about Mastermind is available online.





  • File Name: Publish-Subscribe_Model | Type of File: Application (.exe) | Size: 2.68 MB




  • File Name: Class_DateTime | Type of File: Header file (.h) | Size: 30.2 KB

  • File Name: Node | Type of File: Header file (.h) | Size: 1.17 KB

  • File Name: Notification | Type of File: Header file (.h) | Size: 36.1 KB

  • File Name: publish_subscribe | Type of File: C++ source file (.cpp) | Size: 1.14 KB

  • File Name: Subscription | Type of File: Header file (.h) | Size: 4.80 KB


  • This is a model implementation of a publish-subscribe system in sensor networks. It is model because it only simulates the situation, there are only 3 model nodes and not designed to be used in a real sensor network. Notification class contains the sensor data obtained from the environment. Node class stores the coordinates and info about the node. Subscription class generates subscription messages. Once a node is subscribed to broker with a certain subscription criteria, it starts listening to it where the publisher sends it's data.