Skip to content

qvanle/drDuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

323 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dr Duck

  • CS162 projects.
  • This is a solo project for the course CS162 - Introduction to Computer Science II.
  • Visualize data structures.
  • In this project, I will do a data visualization application.

FEATURES

Static array / dynamic array / singly, doubly, circular linked list / stack / queue

  • Init from file
  • Randomized data
  • Insert / delete / search / update / push / pops
  • Highlight code
  • Custom

Run step by step

Speed up and slow down

Sound

Graphics

Open with file

  • Data is storing in folder saving/

REQUIRED

INSTALL

  • At first you need to install C++17, makefile, CMake:
sudo apt update 
sudo apt install build-essential
sudo apt install make 
sudo apt install cmake 
  • Install SDL2 and external libraries
sudo apt install libsdl2-dev
sudo apt install libsdl2-ttf-dev
sudo apt install libsdl2-image-dev
git clone https://github.com/nlohmann/json.git 
cd json
mkdir build
cd build
cmake ..
make
sudo make install
  • After installed, download the repository and call make.
git clone https://github.com/qvanle/drDuck
cd drDuck 
make 

Usage

1. After call make, a window will pop up

  • If you don't like the sound you can turn off it (the button is on the top-left of screen).
  • Click "start" button to continue.
  • Tutorial and donate are still in developing. Starting screen

2. You have 3 type of data structures

  1. Array.
  2. Linked list.
  3. In and out order (stack and queue). choose data structures

Array

  1. Static array.
  2. Dynamic array. choose array

Linked list

  1. Singly linked list.
  2. Doubly linked list.
  3. Circular linked list. choose linked list

I/O order

  1. Stack.
  2. Queue. choose in and out order

3. Open file

  • After press button "open file" there will a box pop up require to enter file name.
  • This file must be store in folder saving, if there don't exist that file, the window unable to do anything.
  • To create new file, you have to save it with file extension "json"
  • Samples are in saving/ open file

4. Working screen

After you have choose data structures or open file, this screen will be displayed.

working screen

Move the cursor to the right, operator bar will be appeared.

operator bar

Move the cursor to the bottom, play bar will be appeared.

  1. First button will slow down animation
  2. Second button (still in developing)
  3. Third button will Pause/Continue animation
  4. Fourth button will go to next step (when the animation is pause)
  5. Last button will speed up the animation play bar

5. Opeartor bar

New operator

  • Maximum size of static and dynamic array is 12, otherwise it's 10.
  • If the input greater than maximum size, it will ignore the remainder. new opeartor

Insert operator

  • If the size is maximum, it will do nothing.
  • In stack and queue mode, this will be call push. insert operator inserting

Delete operator

  • If the size is equal 0, it will do nothing.
  • In stack and queue mode, this will be call pop. delete operator deleting

Update operator

update operator updating

Search operator

search operator searching

Demonstration

Files/folders structures

Asset/

  • Fonts is stored in folder fonts.
  • Graphics is stored in folder graphics.
  • Sound is stored in folder sound.
  • Attribute folder is use to stored property of buttons, screens, input box, script, Data structures (size, position in screen, font used, graphics used, ...)

include/

  • All file *.hpp is stored here.

src/

  • All file *.cpp is stored here.

saving/

  • All files that use for "open file" features is stored here.

docs

  • Grading scheme is stored here.
  • report is stored here.
  • Open docs/html/index.html to run website version of document.

CMakeLists.txt

  • CMake file

makefile

  • makefile that use to call CMAKE (this is for my text editor)

README.md

Documentation

About

CS162 project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages