On 8/13/2014 4:03 AM, Ibnu Abdul Wahab Yulisar wrote:
I'm confused with the exercise below:
(4.1) Exercise multiple construcors
...
5. (For your own exercise) Modify StudentRecord.java and
ConstructorExample.java as following. Build and run the project.
Create another Constructor in the StudentRecord.java in which
average is also passed as a parameter.
Modify the ConstructorExample.java so that StudentRecord
annaRecord object is created with the newly added Constructor.
====
I think average is not relevant as a parameter because it will be
evaluated by the method getAverage(). So passing any value to that
parameter will be no point. Am I missing something here?
Your observation is indeed correct in that passing average does not make
that much
sense. I revised it as following:
* Add another field called "int age" to the StudentRecord.java
* Create another Constructor in the StudentRecord.java in which age is
also passed as a parameter.
* Modify the ConstructorExample.java so that StudentRecord annaRecord
object is created with the newly added Constructor.
Thanks for reporting it.
-Sang
--
You received this message because you are subscribed to the Google
Groups "JPassion.com: Java Programming" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
Visit this group at http://groups.google.com/group/jpassion_java.
For more options, visit https://groups.google.com/d/optout.
--
-------------------------------------------------------------------
Sang Shin, [email protected]
Founder and Chief Instructor of JPassion.com (JavaPassion.com)
http://www.linkedin.com/in/javapassion (Linkedin)
http://twitter.com/javapassion (Tweeter)
Life is worth living... with Passion!
Practically Free 3 to 5 days Live, Hands-on, Online Codecamps on
Java, HTML5, Ruby/Rails, Grails, JavaScript/jQuery, Spring, Android
http://jpassion.com/codecamps
----------------------------------------------------------------------
--
You received this message because you are subscribed to the Google Groups
"JPassion.com: Java Programming" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/jpassion_java.
For more options, visit https://groups.google.com/d/optout.