Implements and Extends

2 views
Skip to first unread message

Nicholas Levi

unread,
Aug 5, 2011, 9:25:58 PM8/5/11
to BYU 142 Summer 2011
1. --Create the following interface:
---Investment (1 pt)
3. --Create three classes as extensions of Investment:
---Stock (1 pt)
---Rental (1 pt)
---Business (1 pt)
7.--Implement a profit method for each class:
---Stock (1 pt)
---Rental (1 pt)
---Business (1 pt)

How does it says Create the following interface (Line 1) Investment
and later tell that I need to extends Investment (Line 3)?

Line 7 I'm supposing that the interface Investment has a
method public int profit();

So why does it say to create interface and extends that?

William Ingold

unread,
Aug 5, 2011, 9:34:01 PM8/5/11
to byu-142-s...@googlegroups.com
Last I heard you could choose either to make Investment an interface
or an abstract class...
Reply all
Reply to author
Forward
0 new messages