CSE1030Z Lab 06

Practice Lab Test

Thu Feb 14 2:30-4:00 PM

Introduction

This lab tests your knowledge of the following intended learning outcomes:

Note that there are many intended learning outcomes that are not covered by this lab!

This is a practice lab test. You must submit before the computers reboot at the end of the lab.

Question 1: Implement a class that represents a range of values

Implement the class Range so that it provides the following API:

Some code to start your solution can be found here:

Here is a check list of items that your solution must provide:

  1. appropriate attributes
  2. Range()
  3. Range(int min, int max, int init)
  4. Javadoc for the constructor Range(int min, int max, int init)
  5. getValue()
  6. getMaximum()
  7. getMinimun()
  8. setValue(int newValue)
  9. setMaximum(int newMaximum)
  10. setMinimun(int newMinimum)

Submit your solution:

submit 1030Z L6R Range.java

Question 2: Implement a class that represents a monster in a game

Implement the class Monster so that it provides the following API:

Some code to start your solution can be found here:

Here is a check list of items that your solution must provide:

  1. Monster()
  2. getLife()
  3. getToughness()
  4. setToughness(Toughness t)

Submit your solution:

submit 1030Z L6R Monster.java