CS162 Lab # 4: Abstract, Interface, and Eclipse/NetBeans

adorableautomaticΛογισμικό & κατασκευή λογ/κού

15 Αυγ 2012 (πριν από 5 χρόνια και 26 μέρες)

312 εμφανίσεις

Created by Becka Morgan Page 1 of 1
CS162 Lab # 4: Abstract, Interface, and Eclipse/NetBeans

This lab will add to the skills you have already acquired with inheritance by using Abstract classes and
Interfaces. You will also need to start using Eclipse or NetBeans when writing this lab.

Required Reading:

Before beginning this lab you MUST read Chapter 10 of the course textbook - Objects First With Java,
A Practical Introduction Using BlueJ (5th Edition).

Programming Concepts:

This lab will not require a great deal of coding, although you will use the concepts from chapter 10. The
primary focus will be on using a new IDE.


1. Look at both NetBeans and Eclipse to determine if you have a preference. You may also want to
ask classmates, if they have any experience, why they prefer one over the other.
2. Open the IDE and walk through the basic tutorials. You can access the Eclipse tutorial from Help
-> Welcome, and the NetBeans tutorials from Help -> Start Page. (Trust me you will save time
by doing this BEFORE you start.)
3. Once you have a basic feel for the IDE you have chosen, import Lab3 into it (make sure to delete
the BlueJ package file and the .class files). At this point you should have a super class with two
subclasses. Hopefully you also have a class that uses these in an ArrayList. If not, write this
class that holds a collection of other classes (like the NewsFeed class in the network example).
4. Add two subclasses.
5. Using your chosen IDE create a test class for one of the subclasses you did not test yet.
6. Add one abstract method to your super class and make the class abstract.
7. Create an Interface that is implemented by 2 or more of your subclasses.

Turning in your lab:

Once you have tested your lab to make sure it works correctly
 print out the lab submission sheet to give to your lab instructor,
 demonstrate the lab to your lab instructor,
 print out your code, give a copy to the lab instructor with your submission sheet, and
 turn your code into my mailbox in ITC306.