I'm stuck

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

I'm stuck

 
0
  #1
Dec 21st, 2005
Hello I need help and fast, time is running me out.


StudentMark class
A StudentMark object hasd three attributes:moduleNo(a string),studentName(a string) and mark an (int). There is a constructor which registers a student (studentName) with a module number (moduleNo) at the time of construction. There are methods that enable new marks to be entered and retrieved. All the methods of this class are listed below:

Methods
StudentMark

Description.
A constructor. It accepts two strings and assigns them to the moduleNo and studentName respectively. It also sets the mark of the student to 0.

Inputs
Two string objects

OUtput
None.
.
.
.
There are other methods but I thing I can do them.


Please help, I dont no wat a constructer is and my teacher she really sux. What is a method? Is it like a function or sumthing. And is my studentMark class the name of my program or an actual class like in c/c++.

God bless. :cry:

Here is wat i have so far.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: I'm stuck

 
0
  #2
Dec 22nd, 2005
Do your own homework kid.

If you don't know what a constructor is, read some tutorials or maybe it's time to open those course instructions for a change and maybe pay attention in class instead of browsing nekkid women on the web.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: I'm stuck

 
0
  #3
Dec 22nd, 2005
I wish there was someone who would help me instead of mocking me...

Those kind of remarks are just childish jwenting.
:cry:
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: I'm stuck

 
0
  #4
Dec 22nd, 2005
Can sum1 give me sum sudo code for the constructor part.

I think i have 2 use objects as well which is really confusing me. I don't like this student.name, student.moduleno sintax.


BTW is a method the same as a function like in C?

God bless
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: I'm stuck

 
0
  #5
Dec 22nd, 2005
If you'd tried noone's mock you, but as it is you're just a whining little kid asking to get his homework done for him.
That's not just stupid, it's against the rules for this forum.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,273
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 378
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: I'm stuck

 
0
  #6
Dec 22nd, 2005
Ok let me read up on this, then i'll post wat i got.

The only thing is i really confused. It's the jargon which confuses me because in java, a class can be an actual program, and a method is like a function in C i think.

It's hard for me to switch from one language to another.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: I'm stuck

 
0
  #7
Dec 22nd, 2005
In Java everything (except primitives) is a class.
A Java program is a collection of classes, one of which has a main method (or rather an entry point for a JVM, which is usually a main method).
Of course for many small programs (especially the kind you're likely writing as a student) there will be only one class.

Each class will have a constructor (even if you don't write one, in which case one will be provided by the compiler), which replaces the typical method provided with many C structs to initialise them.

You're really going to have to get to grips with OO principles. It's a rough road but a worthwhile one.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the Java Forum


Views: 1393 | Replies: 6
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC