Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > General Gambling > Computer Technical Help
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-27-2005, 07:05 PM
mscags mscags is offline
Senior Member
 
Join Date: Mar 2005
Location: Between Two Hot Twins
Posts: 713
Default C++ Shape Program Help

Alright so I have this program due tomorrow and have no idea how to start it!! Click here and go to homework 3 http://www.cs.missouristate.edu/~liu/csc125/index.htm Any help would be greatly appreciated. Thanks

Mike
Reply With Quote
  #2  
Old 10-27-2005, 08:33 PM
cgwahl cgwahl is offline
Member
 
Join Date: Nov 2004
Posts: 51
Default Re: C++ Shape Program Help

I would just use dynamic multi-dimensional arrays based on the parameters entered by the user...
Reply With Quote
  #3  
Old 10-27-2005, 08:38 PM
mscags mscags is offline
Senior Member
 
Join Date: Mar 2005
Location: Between Two Hot Twins
Posts: 713
Default Re: C++ Shape Program Help

English please lol I'm in an intro class and know nothing about C++ Thanks
Reply With Quote
  #4  
Old 10-27-2005, 08:50 PM
StevieG StevieG is offline
Senior Member
 
Join Date: Jan 2003
Location: Baltimore, MD, USA
Posts: 157
Default Re: C++ Shape Program Help

[ QUOTE ]
English please lol I'm in an intro class and know nothing about C++ Thanks

[/ QUOTE ]

This is Java, so you're going to have to port it to C++ yourself:

<font class="small">Code:</font><hr /><pre>
while (student.takingClassForCredit() ) {
try {
student.DoYourOwnWork();
} catch (slackerException se) {
if (se.Type == slackerException.gettingPissyAtPeopleWhoDoTryToHel p) {
student.FOAD();
}
}
}
</pre><hr />
Reply With Quote
  #5  
Old 10-27-2005, 08:51 PM
OrcaDK OrcaDK is offline
Member
 
Join Date: Nov 2004
Posts: 42
Default Re: C++ Shape Program Help

[ QUOTE ]
I would just use dynamic multi-dimensional arrays based on the parameters entered by the user...

[/ QUOTE ]

Why make is so advanced? All of those tasks can be solved using for loops, besides the menu coding of course.
Reply With Quote
  #6  
Old 10-27-2005, 08:53 PM
cgwahl cgwahl is offline
Member
 
Join Date: Nov 2004
Posts: 51
Default Re: C++ Shape Program Help

[ QUOTE ]
English please lol I'm in an intro class and know nothing about C++ Thanks

[/ QUOTE ]


Basically arrays created on the fly. Your book should show this...otherwise just do a few searches online (your greatest resource for programming anyhow).

For instance the rectangle...say the user wants one that is 4x8

I create 2-dimensional array [4][8] (really it'd be [x][y] or is it (x)(y)?...I can't remember)

Then you'll just have to create the algorithm to give you the output to the array

$$$$$$$$
$oooooo$
$oooooo$
$$$$$$$$

The o's is whitespace.


As for the other 2, just look for the pattern...pretty easy to pick out. Once you figure the one out for the triangle, you'll then have the one for the diamond.
Reply With Quote
  #7  
Old 10-27-2005, 08:54 PM
cgwahl cgwahl is offline
Member
 
Join Date: Nov 2004
Posts: 51
Default Re: C++ Shape Program Help

[ QUOTE ]
[ QUOTE ]
I would just use dynamic multi-dimensional arrays based on the parameters entered by the user...

[/ QUOTE ]

Why make is so advanced? All of those tasks can be solved using for loops, besides the menu coding of course.

[/ QUOTE ]


True

I just like arrays. heh
Reply With Quote
  #8  
Old 10-27-2005, 11:05 PM
mscags mscags is offline
Senior Member
 
Join Date: Mar 2005
Location: Between Two Hot Twins
Posts: 713
Default Re: C++ Shape Program Help

Thanks for the help. I think I can make it work that way.

Mike
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:14 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.