Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create a new file called " EventArray5C". There are some "challenging" directions in this project.
- .
- 1. Prepare a document box (tell me that task(s) the application is to accomplish, how it will accomplish the tasks, the author of the application, the date of completion, and any additional notes.)
- 2. Write a Java statement to create your class header.
- 3. Write a Java statement to create your "main" header.
- 4. Write a Java statement to create an array named "Event" to contain 5 elements. Then assign a copy of "Event" array to an array named "someEvents".
- (Note: you are creating an array of objects, using your previously created Event.java class. Include your Event.java file with this project file)
- 5. Declare a variable of type int and named "x".
- 6. Use a 'for' loop to copy the formal parameters 'x' and 0.0 to
- pass to Event constructor of “Event" class object called "someEvents".
- 7. Use a 'for' loop to print out the two values (x, 0.0) contained in the "someEvents" array elements.
- Use the getEventType( ) method and the getEventMinRate( ) method associated with your "someEvents" array in your print statement. These you defined in Project 4.
- Hint: What Java operator is used to "associate" a method with an object, in this case, an array?
Advertisement
Add Comment
Please, Sign In to add comment