Recitation R15
- Methods, Classes, & Interfaces
Spring 2018
CS163: Java Programming
The purpose of this lab is to write Java code over the following topics:
- To implement a seperate class according to specifications
- To implement a class using an interface.
- To understand iterative development.
Java Programming
- Create a new Java Project named R15
- Copy R15Admit.java into the project.
- Copy R15Interface.java into the project.
- Create a class called R15Room and have it implement R15Interface.
-
The TA will help you do this.
- Declare two private instance variables
- An int called roomBeds to hold the number of beds
- A boolean called roomMonitor that describes whether the room
has a heart monitor
- Write the methods in the interface according to the pre and
post conditions in the interface.
- Create a set of test cases in the main method that test your methods.
- Once your code passes your test cases, run your code using R15Admit.
Show your assignment to the TA for credit
© 2016 CS163/CS164 Colorado State University. All Rights Reserved.