Thread: Final Project for HS, any ideas?

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    2

    Thumbs up Final Project for HS, any ideas?

    Hey, Im a rookie programmer taking my second year programming class in High School (I got to a small private High School in Conneticut). My final project is what ever I want, but I need some ideas.

    Here are the guide lines that my TA pulld of the internet and told us to use:


    1. Use a class
    -Must have class functions
    -Must have a default constructer

    2. Must use 1 recursive function

    3. Must have input/output
    -Printer optional, but preferred

    4. Bonus for using pointers


    Seems simple right? ha not really as Im a transfer student, but I think that I should be able to do it, but Im definetly going to have to go for something simple as I have NO idea how to use classes!

    My initial idea was to make a random # generator, but my friend already has used that idea.

    btw this is the code I am using for my (simple recursive function) which I tippd from my TA's notes

    Code:
    #include <iostream>
    
    using namespace std;
    
    void recurse ( int count ) // Each call gets its own count
    {
      cout<< count <<"\n";
      // It is not necessary to increment count sinceeach function's
      //  variables are separate (so each count will be initialized one greater)
      recurse ( count + 1 );
    }
    
    int main()
    {
      recurse ( 1 ); //First function call, so it starts at one        
    }
    trying to K.I.S.S., and we havent done any visual so i Really cant do any games or anything that needs a GUI

    ..so any ideas on what I should do?


  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Your recursive function is never ending (until program dies). You need some condition that will stop the recursive calls. Eventually your function will crash the program due to eating up all the stack memory.

    As for suggestions, you can make you own linked list or binary tree class.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    Perhaps you should post some details of what you have covered,
    previous assignments, things you're strong/weak at.
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

  4. #4
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Does the program have to have some practical or unified purpose, or does it just have to do all of the criteria without necessarily being related to one another?

  5. #5
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612
    Quote Originally Posted by indigo0086
    Does the program have to have some practical or unified purpose, or does it just have to do all of the criteria without necessarily being related to one another?
    Even if it does have to work together, I'm surprised that the techer hasn't had problems with this project. There are some really lazy solutions that fulfill the criteria.

  6. #6
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Yeah, a simple "power class"would do, that gets a number through a function, gets the exponential, prints it, etc. Seems more like an example more than a project.

  7. #7
    irregularly symmetrical n3v's Avatar
    Join Date
    Mar 2006
    Location
    Finland
    Posts
    67
    perhaps the grade depends on how much work and/or usefulness is in the project. hell if i know though. seems like your teacher is pretty lazy to be a teacher at a small private highschool in connecticut. just do something lazy, as previously specified, then go sailing or something, or whatever it is you do in connecticut prep school.
    If you make a man a fire,
    he will be warm for a day.
    If you set a man on fire,
    he will be warm for the rest of his life.

  8. #8
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    Try writing a linked list. It uses pointers. You can write a print function to display the contents of the list. It has serveral member functions. You can (probably) find a tutorial for writing one on this very site. And knowing how to write one might come in useful later.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  9. #9
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Yes, keep it simple. It’s a little late in the semester to start a semester-project!

    Do you have any hobbies? Can you think of a program idea that relates to your hobby?

    My initial idea was to make a random # generator...
    You really have to know what you are doing to improve on the built-in rand() function.

    But if you like random numbers, they are useful in games and simulations. A simulation is like a computer-game that plays itself. Events are assigned some probabilities and then it’s “tried-out” over and over… Say you have a game where there’s a 10% chance of winning… The computer tries it 1000 times, and you should win about 100 times. Or, you could choose some risky behavior simulation, where there’s a 0.1% chance of dying!

    You can make a simple number-guessing game… The computer generates a secret number. You enter a guess, and the computer says “higher” or “lower”. (You can turn this into a simulation-game by making the computer play itself.)

    Gambling games are also good candidates. Roulette can be done without graphics. Or, a Lotto simulation, where the computer simulates thousands of players. If you go to a private religious school, they may “frown upon” gambling.

    I have NO idea how to use classes!
    Did you miss that class, or has it not been covered yet? Classes are very important to C++. If you don’t understand classs & objects, you can’t claim to know C++ !!!

    Do you understand structures? Classes and objects are easier to understand, if you first understand structures, because a class is just a structure with functions in it.* (There is more to Object Oriented Programming than just throwing functions into your structures.)


    * EDIT - That's not 100% technically correct, because in C++ (unlike C) a structure can contain functions, and a class is not required to contain functions.
    Last edited by DougDbug; 05-23-2006 at 11:51 AM.

  10. #10
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    How about an SFS (simulated file system)? We did one for an assignment last semester, and it fits all of the criteria. You could create file/directory classes and use a recursive function to list the contents of a directory along with its sub-directories' contents. Of course the user can alter the SFS (input), or ask to see it (output). You could even import/export from a file. You could use pointers to reference other files/directories of note.

    Since you don't understand classes, it seems to be out of your league right now, but I thought of it as soon as I read the post, and it was a pretty interesting project.

    btw, I hope that by 'transfer student,' you mean transferred from out-of-state, because Connecticut is spelled Connecticut.
    There is a difference between tedious and difficult.

  11. #11
    Registered User
    Join Date
    May 2006
    Posts
    2
    cool to seem that people are trying to help

    anyway I havent been living ConneCticut THAT long hence the mistake

    secondly I go a private school yes, but NOT a prep school. HUGE difference as our school is full of lazy teachers and we have a small budget, but we are still better off then the awful public schools in the area..

    as far as the project goes I like the idea of linked lists, and I talked to it to my friend who is very proefficient in C++ and I think I will do that. Im going to look over some articles now on classes because I missed the 'lessons' on that. About linked lists though:

    I am reading though this: http://en.wikipedia.org/wiki/Linked_lists

    but since linked lists are data structures and their nodes contain..data, how would I use this for a project, as in what purpose would that have if the list did not have a program to support?

    Thanks for the help, Ill post back later if I have any issues

  12. #12
    Registered User
    Join Date
    Aug 2002
    Location
    Hermosa Beach, CA
    Posts
    446
    You just write a small test program. You can put anything in the list, for example integers would be a good start. A linked list is an important/useful thing all by itself to know how to program, so I would think for this type of project it doesn't really matter what your test program uses it for.
    The crows maintain that a single crow could destroy the heavens. Doubtless this is so. But it proves nothing against the heavens, for the heavens signify simply: the impossibility of crows.

  13. #13
    Registered User Aalmaron's Avatar
    Join Date
    Jan 2004
    Location
    In front of a monitor
    Posts
    48
    ok well as far as the class goes. make your class variables private, then make class functions to edit the class. use a default constructor to add data to instances of yoru class on startup.

    ie, you could make the class make 2 or 3 instances of its self with 1 variable each. the default constructor could have 1 variable that is automaticaly set to 1 via the contructor. then you could print the values out, and ask the user if they want to change any values. if they do, let them change one via the function in the class of the instance of thier choosing. after they enter a new number, print the numbers on the screen again. the recursive function could be one that actualy sets the constructors. give it a static variable set to 0, make the instance of the function an array, and incriment the static variable at the end of hte function before it calls its self again. but make it call its self in an if statement so you only make a few instances.

    when you're done, write teh values to a file, and tell the user what the file name is to open if they choose to print the numbers out.

    ta da.

  14. #14
    Registered User
    Join Date
    Sep 2005
    Posts
    57
    OO my god man make a sudoku solver the hardest assiment at my second year of high school pretty hard and u need some struct and everything lol and recursive funxtion can be pretty usefull.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Project Ideas
    By Sentral in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 09-26-2006, 02:07 PM
  2. Dynamic Binding
    By gpr1me in forum C++ Programming
    Replies: 1
    Last Post: 03-24-2006, 09:01 AM
  3. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 07:41 PM
  4. Project ideas
    By subnet_rx in forum Game Programming
    Replies: 4
    Last Post: 01-06-2002, 03:48 PM
  5. My final project for programming class...
    By Leeman_s in forum C++ Programming
    Replies: 3
    Last Post: 12-20-2001, 04:34 PM