Skip to content

pianocode/A-Life-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Life Simulation

NOTE: This is my Capstone project in the Udacity C++ Nanodegree Program.

In this project, I've built from scratch a system that logs the daily activities of one or multiple people, that is up to the user. This choice was influenced by the desire of putting into practice, what I learned about smart pointers and concurrency in C++. When you run the programs you will be asked how many people you want to participate in the simulation, then you will see how each person does a sequence activities. There are few activities, and each of them cannot be done by more than one person at the same time. That is where concurrency will handle all the activity threads accepting people requests and move them around other activities. The program running looks like this:

Program running in terminal

The program shows in the standard output:

  • which activity is being performed, and the person ID doing the activity
  • the number of times each user does every activity An additional thread makes the program to run for about 60 seconds. This can be tweaked in function setTimer() within src/main.cpp.

If you want more details about the internals of the program, check explanation.md

Dependencies for Running Locally

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory in the top level directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./ALifeSimulation.

About

Project to simulate the daily activities of people. Using threading and memory management principles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors