Confused about project 16

1 view
Skip to first unread message

Benjamin Kemer

unread,
Aug 4, 2011, 11:59:58 PM8/4/11
to BYU 142 Summer 2011
I am completely confused as to where to start project 16, I am not
sure about adding members, and was wondering if anyone was around
tommorrow, or had any examples of polymorphism that might closely
resemble that of project 16.

Thanks,

Benjamin Kemer

Lindsay Heidbrink

unread,
Aug 5, 2011, 10:44:07 AM8/5/11
to BYU 142 Summer 2011
Here's some quick tips:

--adding "members" means adding variables, like "int purchasePrice",
that's all! :)
--polymorphism is using two different "names" when declaring a
variable, like this: Investment myHouse = new Rental(); See how you
use both "Investment" and "Rental" to create the new variable?
Instead of the usual "String[] bigList = new String[]", which uses the
same name (String) on both sides of the "="

Hope that helps!

Sarah Morley

unread,
Aug 5, 2011, 11:10:34 AM8/5/11
to byu-142-s...@googlegroups.com
Lindsay said most of what I was going to say. :)

You can also look at some of the examples we did in class when I taught inheritance/polymorphism/interfaces here: https://groups.google.com/d/topic/byu-142-summer-2011/BHQ72AlyB44/discussion

Sarah
Reply all
Reply to author
Forward
0 new messages