Guest User

Project5c-Arrays

a guest
May 2nd, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1.  
  2. Create a new file called " EventArray5C". There are some "challenging" directions in this project.
  3. .
  4. 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.)
  5.  
  6. 2. Write a Java statement to create your class header.
  7.  
  8. 3. Write a Java statement to create your "main" header.
  9.  
  10. 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".
  11.  
  12. (Note: you are creating an array of objects, using your previously created Event.java class. Include your Event.java file with this project file)
  13.  
  14. 5. Declare a variable of type int and named "x".
  15.  
  16. 6. Use a 'for' loop to copy the formal parameters 'x' and 0.0 to
  17. pass to Event constructor of “Event" class object called "someEvents".
  18.  
  19. 7. Use a 'for' loop to print out the two values (x, 0.0) contained in the "someEvents" array elements.
  20.  
  21. Use the getEventType( ) method and the getEventMinRate( ) method associated with your "someEvents" array in your print statement. These you defined in Project 4.
  22.  
  23. 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