Computer Science Canada Grade 11 Mid-Term ISU |
Author: | NegativeAzn [ Tue Dec 02, 2008 8:58 pm ] | ||
Post subject: | Grade 11 Mid-Term ISU | ||
Well, This is my mid-term CPT, Completed in Approx. 1Hrs30Mins, My CPT /ISU is to create a quiz, with 15 questions on any appropiate topic you want. I chose Mario(Nintendo). I completed it, but i'm wondering if anyone has any suggestions for improvement, or to find any flaws. I think my Program, Is error proof, May not be the best error proofed program, But I think it'll be fine. Suggestions, Bad & Constructive Criticism welcome ![]() Sorry for the indentation, My teacher wants it to be like that; He says it's a good habit + the commenting.
|
Author: | syntax_error [ Tue Dec 02, 2008 9:36 pm ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
Using break is a horrible habit to get into, try not to, simple check if the condition of the original loop is meet or not in this case if Gameloop is n set it to false why have a while loop in the being if you don't use it? btw, no one really likes the whole idea of fake loading screens; the latter is my $0.02; the former however, should be fixed. |
Author: | andrew. [ Tue Dec 02, 2008 9:47 pm ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
It's cool, but it's pretty procedural and isn't the whole point of Java in grade 11 to learn object-oriented concepts? |
Author: | syntax_error [ Tue Dec 02, 2008 9:50 pm ] |
Post subject: | Re: RE:Grade 11 Mid-Term ISU |
andrew. @ Tue Dec 02, 2008 9:47 pm wrote: It's cool, but it's pretty procedural and isn't the whole point of Java in grade 11 to learn object-oriented concepts?
I doubt they are even taught what an object is. Yet. Hopefully. |
Author: | andrew. [ Tue Dec 02, 2008 9:51 pm ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
It's halfway through the course so they should know what an object is. It's fairly important in Java and it took me a while to wrap my head around the concept. |
Author: | NegativeAzn [ Tue Dec 02, 2008 10:56 pm ] | ||
Post subject: | Re: RE:Grade 11 Mid-Term ISU | ||
syntax_error @ Tue Dec 02, 2008 9:36 pm wrote: Using break is a horrible habit to get into, try not to, simple check if the condition of the original loop is meet or not in this case if Gameloop is n set it to false why have a while loop in the being if you don't use it?
btw, no one really likes the whole idea of fake loading screens; the latter is my $0.02; the former however, should be fixed. I guess I should delete the whole false-load thing. I don't really understand what you're trying to say, yes I already know break is a really bad thing to use, since the whole AT&T network disaster. I tried doing a simple check if condition, but i'm not sure , this is what I tried, But can't really figure to work it. At the end, it doesn't loop, anyone mind suggesting what to do?
|
Author: | wtd [ Wed Dec 03, 2008 12:32 am ] | ||
Post subject: | RE:Grade 11 Mid-Term ISU | ||
The following kind of comment would cost you points in wtd's classroom.
|
Author: | Okapi [ Wed Dec 03, 2008 4:24 am ] | ||
Post subject: | Re: RE:Grade 11 Mid-Term ISU | ||
wtd @ Wed 03 Dec, 05:32 wrote: The following kind of comment would cost you points in wtd's classroom.
Why? |
Author: | wtd [ Wed Dec 03, 2008 12:02 pm ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
Comments are meant to shed light on the reasoning behind a piece of code above and beyond the information the code itself provides. That type of comment does not do so. It is just extra visual clutter and makes the code harder to read for no benefit. |
Author: | S_Grimm [ Wed Dec 03, 2008 12:32 pm ] |
Post subject: | Re: RE:Grade 11 Mid-Term ISU |
wtd @ Wed Dec 03, 2008 12:02 pm wrote: Comments are meant to shed light on the reasoning behind a piece of code above and beyond the information the code itself provides.
That type of comment does not do so. It is just extra visual clutter and makes the code harder to read for no benefit. How is it visual clutter? I use this type of comment to easily identify where the block of code starts and ends and where the classes end. When my code is 1000+ lines of code, I need to be able to see my procedures. |
Author: | wtd [ Thu Dec 04, 2008 12:25 am ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
It's extra.... stuff to look at. And it doesn't say anything useful that the code itself shouldn't already be telling you. |
Author: | syntax_error [ Thu Dec 04, 2008 1:05 am ] | ||
Post subject: | Re: RE:Grade 11 Mid-Term ISU | ||
NegativeAzn @ Tue Dec 02, 2008 10:56 pm wrote: syntax_error @ Tue Dec 02, 2008 9:36 pm wrote: Using break is a horrible habit to get into, try not to, simple check if the condition of the original loop is meet or not in this case if Gameloop is n set it to false why have a while loop in the being if you don't use it?
btw, no one really likes the whole idea of fake loading screens; the latter is my $0.02; the former however, should be fixed. I guess I should delete the whole false-load thing. I don't really understand what you're trying to say, yes I already know break is a really bad thing to use, since the whole AT&T network disaster. I tried doing a simple check if condition, but i'm not sure , this is what I tried, But can't really figure to work it. At the end, it doesn't loop, anyone mind suggesting what to do?
play with the true condition of the while loop. You should get it now. |
Author: | rto [ Thu Dec 04, 2008 10:09 am ] |
Post subject: | Re: Grade 11 Mid-Term ISU |
I've been working with java for about a year and (correct me if i'm wrong please wtd, AV or somebody else who knows), but I would suggest putting the correct / Incorrect statements into their own methods to clean up a couple of lines of text ![]() again, i could be wrong so i would suggest waiting on another post to tell you whether this is a good idea or not azn ![]() |
Author: | S_Grimm [ Thu Dec 04, 2008 11:35 am ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
putting the questions in there own procedures is helpful, but checking if the answer is right is just a couple of if statements and boolean variables. |
Author: | HeavenAgain [ Thu Dec 04, 2008 3:46 pm ] |
Post subject: | Re: Grade 11 Mid-Term ISU |
rto @ Thu Dec 04, 2008 11:09 am wrote: I've been working with java for about a year and (correct me if i'm wrong please wtd, AV or somebody else who knows), but I would suggest putting the correct / Incorrect statements into their own methods to clean up a couple of lines of text
![]() again, i could be wrong so i would suggest waiting on another post to tell you whether this is a good idea or not azn ![]() A general rule in programming is when you need to copy/paste codes, then you are doing something wrong... |
Author: | chili5 [ Sat Dec 20, 2008 8:33 pm ] |
Post subject: | RE:Grade 11 Mid-Term ISU |
Another thing, your coding in all your questions directly into main. This doesn't really make your program more expandable easily. Why don't you read in the questions and answers in from an external file? |