COMP 1405 Lecture Notes - Lecture 1: Roller Coaster, Jcreator, Java Development Kit

68 views6 pages

Document Summary

Comp1405 - assignment #2 (due: friday, october 23rd @ 4:30pm (afternoon)) In this assignment, you will create 3 objects and get them to interact together. Specifically, you will create a ticketbooth object in which person objects will purchase tickets in order to get onto rides. You will define these classes, then do testing which simulates many people buying tickets and getting on the rides. The testing will then compute additional information about the rides and ticket booth. (1) the ride class. Write a constructor that takes as parameters the name of the ride, # of tickets required and height requirement. Lastly, write a tostring() method that returns a string in the following format: Roller coaster requiring 6 tickets with a height restriction of 4. 9" Write a test program called ridetestprogram. java that creates two rides using the 3-parameter constructor and one ride using the 0-parameter constructor and then displays the rides to the console.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers