Giter Club home page Giter Club logo

goblet-of-fire's Introduction

About

I created an algorithm to randomly select 3 candidates from the Goblet of Fire. Each candidate has an name, age, and school. Every candidate must be at at least 17 years of age in order to participate in the Triwizard tournament.

This program is not affiliated with JK Rowling and the Harry Potter series. It is created by a fan.

Lore

Hogwarts, Beauxbatons, and Durmstrang compete for the Triwizard Cup. In order to compete for the Triwizard Cup, each school needs an older student to represent their school.

List of Files

  • Control.cc
  • Control.h
  • Goblet of Fire UML.pdf
  • main.cc
  • Makefile
  • Participant.cc
  • Participant.h
  • README.md
  • View.cc
  • View.h

Steps

  1. Students put their names in the Goblet of Fire for the Triwizard Tournament. All students must be 17 years or older. Any underage student will not be allowed to partcipate in the Triwizard Tournament. If a student is underage, the program goes back to the menu. If there is no input, the program goes back to the main menu.
  2. The Goblet of fire will choose 3 students from different schools to participate in the Triwizard Tournament. I programmed my Goblet of fire to choose 3 random students from diffeerent schools.
  3. Print out the chosen candidates.

Compilation

  1. Download this file and unzip it
  2. Call make
  3. Call ./executable and enjoy

Compilation Notes

Tested on an Ubuntu 18.04 enviroment. The code works with C++98 and C++11 syntax.

Read More

Goblet of Fire

goblet-of-fire's People

Contributors

alanreviews avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

dmattia

goblet-of-fire's Issues

If no input is added, nothing happens

Enter your age:

Basically stays in age

When a user does not enter their age, name, or school, nothing happens. Is it possible to add a condition where the user does not input anything and return to the main menu?

Memory leaks in Goblet of Fire dynamically allocated version

==4641==
==4641== HEAP SUMMARY:
==4641== in use at exit: 72 bytes in 1 blocks
==4641== total heap usage: 5 allocs, 4 frees, 74,896 bytes allocated
==4641==
==4641== 72 bytes in 1 blocks are definitely lost in loss record 1 of 1
==4641== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4641== by 0x109EAD: Control::launch() (Control.cc:92)
==4641== by 0x1091E8: main (main.cc:8)
==4641==
==4641== LEAK SUMMARY:
==4641== definitely lost: 72 bytes in 1 blocks
==4641== indirectly lost: 0 bytes in 0 blocks
==4641== possibly lost: 0 bytes in 0 blocks
==4641== still reachable: 0 bytes in 0 blocks
==4641== suppressed: 0 bytes in 0 blocks
==4641==
==4641== For counts of detected and suppressed errors, rerun with: -v
==4641== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.