944,025 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1481
  • Java RSS
Dec 21st, 2005
0

I'm stuck

Expand Post »
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.
Similar Threads
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 22nd, 2005
0

Re: I'm stuck

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 22nd, 2005
0

Re: I'm stuck

I wish there was someone who would help me instead of mocking me...

Those kind of remarks are just childish jwenting.
:cry:
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 22nd, 2005
0

Re: I'm stuck

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
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 22nd, 2005
0

Re: I'm stuck

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 22nd, 2005
0

Re: I'm stuck

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.
Featured Poster
Reputation Points: 1536
Solved Threads: 431
Posting Expert
iamthwee is offline Offline
5,865 posts
since Aug 2005
Dec 22nd, 2005
0

Re: I'm stuck

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Homework Help
Next Thread in Java Forum Timeline: Random backgrounds





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC