I am so confused!

Reply

Join Date: Dec 2007
Posts: 8
Reputation: girlinwayside is an unknown quantity at this point 
Solved Threads: 0
girlinwayside girlinwayside is offline Offline
Newbie Poster

I am so confused!

 
0
  #1
Feb 2nd, 2009
I am taking an online java programming class this quarter and the book I have just does not do a good job of explaining anything! The more I read it, the more confused I become!

Can someone refer me to an article or site that explains creating methods in terms that are easy to understand? I'll post a copy of my assignment below so you can have an idea of what Im looking for..

Create a class named Eggs. Its main() method holds an integer vaiable named numberOfEggs to which you will assign a value. Create a method to which you pass numberOfEggs.
The method displays the eggs in dozens; for example, 50 eggs is 4 full dozen with two left over.

Save the program as Eggs.java.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,438
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 510
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: I am so confused!

 
0
  #2
Feb 2nd, 2009
You may want to review some of the material in the "Starting Java" thread that is stickied at the top of the forum for basics.

What part of the assignment do you not understand? What do you have so far?
Last edited by Ezzaral; Feb 2nd, 2009 at 5:16 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 8
Reputation: girlinwayside is an unknown quantity at this point 
Solved Threads: 0
girlinwayside girlinwayside is offline Offline
Newbie Poster

Re: I am so confused!

 
0
  #3
Feb 2nd, 2009
I am really confused about the whole deal. This is only the second week of the class and I haven't been able to grasp the idea of any of it thus far.
I dont understand what it means by "passing"

This is what I have so far.

public class Eggs
{

public static void main(String[] args)
{
int numberofEggs = 25;

System.out.println("25 eggs are two full dozen plus one");

}
}

Ill go read though that thread.. thanks
Last edited by girlinwayside; Feb 2nd, 2009 at 5:30 pm.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,438
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 510
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: I am so confused!

 
0
  #4
Feb 2nd, 2009
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,563
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 196
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso

Re: I am so confused!

 
0
  #5
Feb 2nd, 2009
They mean make a method that has a parameter, numberOfEggs, which is an integer.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 9
Reputation: doleh is an unknown quantity at this point 
Solved Threads: 1
doleh's Avatar
doleh doleh is offline Offline
Newbie Poster

Re: I am so confused!

 
0
  #6
Feb 3rd, 2009
try to read in elliot coffman book in java its very simple to understand
public class eggs
{public static void main(String args [])
{
int NumberOfEggs =25;
System.out.print("Full dozen"+ duzen(NumberOfEggs ) );
}
public int duzen( int x)
{return x/12; }
}
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 84
Reputation: knowledgelover is an unknown quantity at this point 
Solved Threads: 0
knowledgelover knowledgelover is offline Offline
Junior Poster in Training

Re: I am so confused!

 
0
  #7
Feb 3rd, 2009
it is OK the beginning always be like that

you may want to try read this, I had when I was in my earlier weeks

http://www.freejavaguide.com/corejava.htm

also the Deitel and Deitel resource are worthy to read
if you have visited that link and not helping plz let me know, and wish you can send what sites you have tried so far,

passing means that to send the parameter the method would use in its calculation, sending them when you call the method,

hope this helps, good luck
Last edited by knowledgelover; Feb 3rd, 2009 at 6:51 am. Reason: link update
there's always something to learn
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 8
Reputation: girlinwayside is an unknown quantity at this point 
Solved Threads: 0
girlinwayside girlinwayside is offline Offline
Newbie Poster

Re: I am so confused!

 
0
  #8
Feb 3rd, 2009
Thanks everyone. I will look over the link and see if it helps.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 706
Reputation: stultuske is a jewel in the rough stultuske is a jewel in the rough stultuske is a jewel in the rough 
Solved Threads: 84
stultuske's Avatar
stultuske stultuske is offline Offline
Master Poster

Re: I am so confused!

 
1
  #9
Feb 4th, 2009
Originally Posted by girlinwayside View Post
I dont understand what it means by "passing"
'passing' here is about the same as in sports: one guy has the ball, he 'passes' it to another guy, now that other guy has controle over it.

  1. // class that uses an object or class
  2. Sports.showPass("this ball");
  3.  
  4. // other class -> Sports.java
  5. public void showPass(String pass){
  6. // the String-object 'pass' is passed on to the method
  7. System.out.println("the first player passed " + pass);
  8. }
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 8
Reputation: girlinwayside is an unknown quantity at this point 
Solved Threads: 0
girlinwayside girlinwayside is offline Offline
Newbie Poster

Re: I am so confused!

 
0
  #10
Feb 4th, 2009
Originally Posted by stultuske View Post
'passing' here is about the same as in sports: one guy has the ball, he 'passes' it to another guy, now that other guy has controle over it.

  1. // class that uses an object or class
  2. Sports.showPass("this ball");
  3.  
  4. // other class -> Sports.java
  5. public void showPass(String pass){
  6. // the String-object 'pass' is passed on to the method
  7. System.out.println("the first player passed " + pass);
  8. }

Thanks! Those are terms I can understand.. LOL I will be working on this all day today - I have three assignments and an application test all due today! EEEKKK! I have been reading the same chapter in my textbook since Sunday trying to understand this stuff.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC