Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,442 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,310 people online right now. Registration is fast and FREE... Join Now!




Programming Project

 
Reply to this topicStart new topic

Programming Project

Quboid
24 Nov, 2007 - 10:12 PM
Post #1

New D.I.C Head
*

Joined: 23 Jul, 2007
Posts: 5


My Contributions
Hello all,

I have a programming project to hand up in about 3 weeks time. It is for my c++ course. I have to make a crossword puzzle (not a puzzle generator). So I am expected to write the code that would challenge the user to do a crossword puzzle. I was wondering if someone could point me in the right direction. My requirements are : the use of files, and abstraction (the use of classes and object, OOP). My plans are to create 3 crossword puzzle files that would contain the words for the corresponding puzzle and make a random choice at the beginning of the program (does that sound good, is there a better way to do it), then I as the user tries to solver a word i can match it with a word that i have pre-stored in a binary file on the system, if the match is correct the program allows the input, if the match is not correct it fails to user and clears the spaces again. (this would involve points to positions in a matrix and binary files,).


I am not sure how a puzzle generator works but i don't think it would work for e since i need the answers ready made so the user can start solving.
My main concern is the abstractions part, what should i make the object in a program like this? what should be its attributes? I just need to be pointed in the right direction with this and the i'm on my way, any advice at all willbe greatly appreciated. Thank you in advance.

Qubo
User is offlineProfile CardPM
+Quote Post

Bench
RE: Programming Project
25 Nov, 2007 - 05:10 AM
Post #2

D.I.C Addict
Group Icon

Joined: 20 Aug, 2007
Posts: 621



Thanked: 14 times
Dream Kudos: 150
Expert In: C/C++

My Contributions
The first thing is to forget about implementation details until you have a clear idea of what you're doing. Your "requirements" as you've stated them so far don't help you with the project at all. OOP, files, abstractions, classes, etc, are all tools available at your disposal, but are not part of your problem (although they are likely to form a part of your solution)
In other words,there's no point deciding whether you're going to have files, a matrix, a linked list, etc if you're not sure yet what exactly your program is going to do.

step one should be to set out some clear goals, You need to decide whether you're going to write a puzzle generator, or simply pick between random pre-set crosswords. This decision will affect every other decision you make (So you probably ought to read the specifications and/or discuss this with your tutor if you can't decide which to do.) Your tutor may tell you that a randomly picked pre-set puzzle is too simple, although writing a program which compares a stored puzzle to a user's attempt may help, since your random puzzle generator is going to be storing its generated answer 'somewhere'.

Once you have done this, you can decide upon the program's functionality. What should hopefully emerge in this process is a list of entities that your program contains, and some of the operations these entities perform or have performed on them. At this point, details of the solution, and the tools you'll need to use should become clear


Note - for a puzzle generator, you'd need somewhere to maintain a list of valid words (A dictionary) that the generator can attempt to fit into a crossword grid. A puzzle generator will probably create a complete solution and store it somewhere, then the user will have their go at solving it.

This post has been edited by Bench: 25 Nov, 2007 - 05:26 AM
User is online!Profile CardPM
+Quote Post

Quboid
RE: Programming Project
25 Nov, 2007 - 08:12 AM
Post #3

New D.I.C Head
*

Joined: 23 Jul, 2007
Posts: 5


My Contributions
Ok, well I think I am officially in the "deciding what to do phase". Since I have only three weeks to write the program I may just go with the Picking of a preset puzzle stored 'somewhere'. But incase my tutor decides otherwise. What are the exact dynamics of a puzzle generator?

cheers

qbo
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 02:10PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month