|
-
November 16th, 2009, 05:34 PM
#1
Need help with a homework dealing with class inheretence
This is the homework
http://i34.tinypic.com/30bjpd0.jpg
It's #5
This is my code
http://pastebin.com/d76a45c10
This is how it runs

Any idea what I can fix or do with that last display? I need to use that method/function to display it but it freaks out to no end when I try to do it via the method/function. I just know that there has to be something I"m missing something really stupid.
-
November 16th, 2009, 07:26 PM
#2
Re: Need help with a homework dealing with class inheretence
function1: Replace void constructor() with your default class name
Other functions should be done similarly, and I have no idea why you construct your classes that way.
-
November 16th, 2009, 08:31 PM
#3
Re: Need help with a homework dealing with class inheretence
 Originally Posted by Ha555
function1: Replace void constructor() with your default class name
Other functions should be done similarly, and I have no idea why you construct your classes that way.
Just because I know what's the contructor and what not... so void constructor should just be... Restuarant meal?... but that doesn't really help me currently.
-
November 16th, 2009, 09:59 PM
#4
Re: Need help with a homework dealing with class inheretence
 Originally Posted by rubsnick
Just because I know what's the contructor and what not... so void constructor should just be... Restuarant meal?... but that doesn't really help me currently.
You really need to clean up the obvious mess first. Get rid of the explicit "constructor" functions and replace them with the standard versions. Regardless if you create a function named "constructor", the compiler will also generate one with the same name of the class that will be run when the object is created. That's what a constructor is, not a function you call.
-
November 17th, 2009, 11:21 AM
#5
Re: Need help with a homework dealing with class inheretence
Screw it . I solved my problem my code works. I am student and I feel that names are irrelevent to the function. I just want to get the job done I care little for prettyness the important thing is I learn and i frankly dont see the problem with a simple name. I could name it butthead and it will do the same **** function! thanks but no thanks i managed to solve my problem my self. ya wont be seeing me here again. you elitist bastards
-
November 17th, 2009, 11:24 AM
#6
Re: Need help with a homework dealing with class inheretence
 Originally Posted by rubsnick
Screw it . I solved my problem my code works. I am student and I feel that names are irrelevent to the function. I just want to get the job done I care little for prettyness the important thing is I learn and i frankly dont see the problem with a simple name. I could name it butthead and it will do the same **** function! thanks but no thanks i managed to solve my problem my self. ya wont be seeing me here again. you elitist bastards
Bye. Thanks for dropping by. Glad to see you know it all already. Good luck with that attitude in the real world. You're going to need mentors and more experienced people to help you as you go and that's not how to go about getting them. That outburst would cost you your job in most places I know.
-
November 17th, 2009, 11:35 AM
#7
Re: Need help with a homework dealing with class inheretence
So they provide good "FREE" constructive criticism and you go ballistic on them? read http://en.wikipedia.org/wiki/Bipolar_disorder
Also function names matter
0100 0111 0110 1111 0110 0100 0010 0000 0110 1001 0111 0011 0010 0000 0110 0110 0110 1111 0111 0010
0110 0101 0111 0110 0110 0101 0111 0010 0010 0001 0010 0001 0000 0000 0000 0000 0000 0000 0000 0000
-
November 17th, 2009, 05:00 PM
#8
Re: Need help with a homework dealing with class inheretence
function names don't matter much to the computer, they only matter to the programmer. unless the name of the function is a reserved word, or something like that that. yes it is true. you can name them anything you want (within the rules) but it is just stupid to work that way. names that do not make sense and the lack of comments is the mark of a newb, or a lazy student who doesn't care about anything but a grade. The things experienced people teach us can help us avoid making the mistakes they made if we will just listen.
-
November 17th, 2009, 09:20 PM
#9
Re: Need help with a homework dealing with class inheretence
 Originally Posted by GCDEF
Bye. Thanks for dropping by. Glad to see you know it all already. Good luck with that attitude in the real world.
I bet rubsnick will come crawling back here (under another name of course), asking for one of us to help him/her with another assignment.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|