CSCI 201 Homework 8

In this assignment, you will modify your Homework 7 solution to use a class to represent a ring-back signal. This class should implement the TwoToneCycle class specification which contains three constructors, four accessor methods, five modifier methods, a makeSound method to generate a Sound, and a toString method.

It's really not that hard to write these methods. Mostly it involves cut-and-paste followed by some editing. The makeSound method is a little harder, but it's mostly a repackaging of some Java you wrote for Homework 7.

When your TwoToneCycle class is completed, you should be able to generate and play the US, French, and Japanese ring-back with the following Java statements.

  TwoToneCycle ringbackUS = new TwoToneCycle() ;
  ringbackUS.makeSound().explore() ;
  TwoToneCycle ringbackFR = new TwoToneCycle(400, 1.65, 3.35) ;
  ringbackFR.makeSound().explore() ;
  TwoToneCycle ringbackJP = new TwoToneCycle(384, 416, 1.0, 3.0) ;
  ringbackJP.makeSound().explore() ;

Better yet, you can use a Homework 8 tester program to make sure your class is working correctly.

Due date and turning it in

This assignment is due by class on December 8. Submit your assignment using the UNCA Moodle to the assignment labeled "Homework 8 -- Ring Back Class".