| | |
I'm stuck
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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.
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*
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.
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.
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.
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*
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.
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.
![]() |
Similar Threads
- Windows XP is stuck! (Windows NT / 2000 / XP)
- Advertisment icons stuck to my desktop!!! (Viruses, Spyware and other Nasties)
- Stuck writing a Function (C++)
- error message when shutting down, startup page stuck to http://dr-search4u.com/ind... (Viruses, Spyware and other Nasties)
- Stuck In Restart Loop (Windows NT / 2000 / XP)
- Help with Class, stuck. (C++)
- CPU use stuck at 100% (Viruses, Spyware and other Nasties)
- Stuck on start up (Windows NT / 2000 / XP)
- Internet explorer 5 gets stuck (Web Browsers)
- stuck in lower case, lost functions (Windows NT / 2000 / XP)
Other Threads in the Java Forum
- Previous Thread: Homework Help
- Next Thread: Random backgrounds
Views: 1393 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for Java
android api apple applet application apps arguments array arrays automation awt binary bluetooth businessintelligence busy_handler(null) card chat class classes client code collision component constructor database draw eclipse error event eventlistener exception file fractal game givemetehcodez graphics gui helpwithhomework html ide image input integer j2me jar java javafx javamicroeditionuseofmotionsensor javaprojects jmf jni jpanel jtree julia link linux list loop machine map method methods mobile netbeans newbie nls number object oracle parsing plazmic print problem program programming project recursion scanner screen server set sharepoint size smart sms socket sort sortedmaps sql string swing test textfield threads time transfer tree unlimited webservices windows






