- Gregorian Calendar Printer
- Game of Life
- String Library Functions Implementation
- Employee Struct Implementation
- Predator-prey simulation
- Event-driven simulation
This CLI (Command Line Interface) program will display a twelve month calendar for an arbitrary year after year 1582.
This CLI (Command Line Interface) program will allow the user to simulate John Conway's Game of Life on the console / command line interface (ex: BASH), within the grid that is customized by the user.
Online Demo to compare result
Run with:
./life 10 10 10 blinker.txt y y
First stage | Second state | Third (final) stage |
---|---|---|
- size_t mystrlen1(const char* s);
- size_t mystrlen2(const char* s);
- char* mystrdup1(const char* src);
- char* mystrdup2(const char* src);
- char *mystrcpy(char *dest, const char *src);
- char *mystrcat(char *dest, const char *src);
- char *mystrncat(char *dest, const char *src, size_t n);
- char *mystrncpy(char *dest, const char *src, size_t n);
- char *mystrndup(const char *s, size_t n);
Implement and test functions related to a newly created Employee struct in C.
- struct Employee makeEmployee(int birth, int start, const char name);
- void printEmployee(struct Employee *e);
- struct Employee* makeRandEmployee();
- int randInt(int max);
- char *randStr();
- char randLowercase();
- char randUppercase();
- struct Employee **getRandListEmployee(int size);
- void printEmployees(struct Employee **list, int count);
- void freeArray(struct Employee **list, size_t count);
- struct Employee **shallowCopy(struct Employee **list, int size);
- struct Employee *deepCopyEmp(struct Employee *e);
- struct Employee **deepCopyList(struct Employee **list, size_t size);
Implement a simple 2D predator-prey simulation using derived classes and virtual functions in C++.
Run with:
./PA4 20 200 200 20 2 1
An event-driven simulation is a computer program that mimics the behavior of people or objects in a system in response to events that occur at certain times.
Specifically, this program will simulate a simply, daily activity of people in a Bank.
The major activities that we are tracking are:
- For customers:
- Customer arrival.
- Customer leaving bank.
- For Bank tellers:
- Teller's service for one customer.
- Teller's completion of service.
- Teller's break.
- Measure the average amount of time people spend between arriving at the bank and leaving the bank.
- Compare the efficiency between two possible bank setup:
- One customer line for each teller.
- One common line for all tellers.