Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Jem Edwards

Greenhorn
+ Follow
since Mar 28, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jem Edwards

Hi Jacquie!
Thanks for taking the time to join us. I have taken one college class on Java Programming and it was a bear. Before I take the second class I have been going through other books that are supposed to help out beginners but they all seem to be going through the same script and not much help for a novice like me. In fact, this forum has been more help than some of the books I've tried to learn from including "Java for Dummies"!
How do you consider your approach in writing this "Beginner" book different from others?
[ October 14, 2003: Message edited by: Jem Edwards ]
18 years ago
I recently took a University Internet course entitled "Intro to Java Programming". It was a disaster! First of all, the book we used by Walter Savitch is not very beginner friendly and second, I really miss the interaction of a teacher writing code on a board and having the class break it down and/or discuss it. This board was invaluable to me while I was working on projects for the class!
I have to take the second level of this course and I intend to take it in a classroom environment but first I have to try and reteach myself the Intro class again. Besides re-reading the Savitch textbook, I'm hoping that your book will break down Java easier for me so I can continue to the next level.
18 years ago
I'm trying to get a clear understanding of constructors before I start my next exercise. Please tell me if I have a inkling of what I'm talking about. Also could someone "dumb down" constructors even more for me?
My understanding is that a constructor is used only when you create a new object (instantiate an object). For instance: Species dog=new Species(husky,black,10)
A constructor is just a "set method" but the constructor invokes the "set" method at the time the object is created - correct?
The difference is instead of "name of object.set(string,string,int)" it should be "name of class(string,string,int)". For instance:
Species dog=new Species(husky,black,10)
instead of
dog.set (husky,black,10)
Thanks for your guidance.
19 years ago
If I see a java source code for an applet how hard is it to convert it to a stand-alone program? What is the differences that stand out in the applet source code?
19 years ago
Thanks all. I'll put your guidance to work!
19 years ago
I pieced together some code directly from a class (instead of just typing the method in my code) so I could see exactly how it works and I don't understand why the compiler is telling me that it cannot return a value from a void method. I understand the concept of not returning a value from a void method but if both the Class definition and the book has this where did I go wrong?
I guess I should take a break - been going at it for six hours straight.

What did I do wrong?

[ edited to alleviate the pain of left-right scrolling -ds ]
[ April 12, 2003: Message edited by: Dirk Schreckmann ]
19 years ago
Can I please get some advice on my pseudocode and tell me if I'm missing any steps or have any steps incorrect before I proceed to making it into a looping statement?
Here is an exercise which I am attempting to work on in a stand-alone program:

Write a program to find out how many years it will take for one population to exceed the other population. The program should ask for the data on both species (name of species, the population and growth rate) and will respond by telling how many years it will take for the populations to change so that the species that starts with the lower population has a population that exceeds that of the species that starts with the higher population.

Many Thanks!
19 years ago
When I look at an example in a textbook it's hard for me to tell if it's a Class definition or a program code.
For example: public class Project4 (program) or public class Species (this is a class definition).
Is there something in a class definition that tells me it's a class?
19 years ago
Layne-nope I wasn't having problems compiling my "pathetic little code". It compiled fine but I was stumped as to how to proceed on with getting the solution to the problem of "how many years it will take for the populations to change so that the species that starts with the lower population has a population that exceeds that of the species that starts with the higher population".
Joel-you're right about figuring out something on paper first so this morning I am trying to do a pseudocode (learned about that in Chapter 1!) Thank you for the advice on the comment line. I appreciate any advice from more experienced users.
Jim-you're right. None of us can figure out where the set method comes in but the Dr. posted just that portion of the Species class in his homework assignment after the book tells us to use the Species class for the exercise(it didn't say just to use a portion of the class).
I'm now going to start a new post regarding a question on pseudocode.

[ April 12, 2003: Message edited by: Jem Edwards ]
[ April 12, 2003: Message edited by: Jem Edwards ]
19 years ago
Internet exercise this week involves the Species class and none of us has a clue. This week it's Chapter 4 (Defining Classes and Methods) and most of us still can't understand Branching/Looping statements from Chapter 3 last week! So I will attempt to post it here and hopefully someone will give me plain, vanilla instructions on how to proceed. If anyone of you remember your Java schooling, I bet you remember this exercise.
OK - here's the exercise which I am attempting to work on in a stand-alone program:
Write a program to find out how many years it will take for one population to exceed the other population. The program should ask for the data on both species (name of species, the population and growth rate) and will respond by telling how many years it will take for the populations to change so that the species that starts with the lower population has a population that exceeds that of the species that starts with the higher population.
I am also including a copy of the Species class and what little code I've just figured out how to use today. We need to use the set method of the Species class but don't know how to get it to run. I think that there has to be a loop involved somewhere to keep calculating the years and growth rate with some kind of break code to tell it when to stop and give me results.
Thank you.
My pathetic little code so far:

This is the code for the Species class:
19 years ago
In this internet class that I've been in for four weeks I've only been trying to code in the stand-alone version.
My question is - was it a mistake to skip over the "optional" section that referenced applets. Should I go back to the chapter and try to learn the Applet way instead. Or I may wait till this class is over in four weeks.
I think I understand that the applets are for use on the web. Is it better to just continue trying to learn in the stand-alone way. Mind you-it's hard to find books that talk way down to my level on stand-alone programming. Even Java for Dummies talked about applets!
What's the verdict - keep learning by stand-alone or applete.
19 years ago
Layne: Yeap - I need to remember to post what the program does. I'm sure that a big help to those that are trying to help me with my problem!
Joel: Thank you - thank you! Especially for breaking it down so I can understand it. Previously the program would say I have 5 grades but drop the first grade and put the other four remaining grades in their correct breakdown and it would give me 0 as the percentage.
Now it works! I'm going to dissect this exercise and your answers piece by piece so I can prepare for the next one and the final.
19 years ago
My internet instructor gave me the following feedback on the exercise I turned in:
2 reads before the do.
Double counted the first entry.
% is times 100.
His cryptic responses are killing me-I don't understand what or where my errors are. This is his second response to my question reqarding his first response when he just said: 2 reads before the do. I give up trying to get a complete answer from him.
Would someone please review my code and tell me in plain english what it is that my instructor said?
Thanks.

[ April 09, 2003: Message edited by: Jem Edwards ]
[ April 09, 2003: Message edited by: Jem Edwards ]
19 years ago
Thanks all. Our internet class discussion group was figuring that there was something about the numbers the program was reading in but we couldn't figure it out.
Thanks a bunch!
19 years ago
I'm trying to have the program compute the high score, low score and average of all scores. It's doing the high & low ok but it's giving me only something close to an average. I can't even figure out how the average is being computed to the number it spits out. Any help is greatly appreciated!
[ edited to remove tabs and fix indention -ds ]
[ April 03, 2003: Message edited by: Dirk Schreckmann ]
19 years ago