Using the die class defined in this chapter write a class


1. Write a program that generates a random integer in the range 20 to 40, inclusive, and displays the sine, cosine, and tangent of that number.
2. Write a class called Book that contains instance data for the title, author, publisher, and copyright date. Define the Book constructor to accept and initialize this data. Include setter and getter methods for all instance data. Include a toString method that returns a nicely formatted, multiline description of the book. Create a driver class called Bookshelf, whose main method instantiates and updates several Book objects.
3. Using the Die class defined in this chapter, write a class called PariOfDice, composed of two Die objects. Include methods to set and get the individual die values, a method to roll the dice, and a method that returns the current sumof the two die values. Create a driver class called RollingDice2 to instantiate and use a PairOfDice object.

Request for Solution File

Ask an Expert for Answer!!
Mathematics: Using the die class defined in this chapter write a class
Reference No:- TGS01058525

Expected delivery within 24 Hours