Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. 2.22.2 File Practice Activity 1
  2. Review the API documentation for createReader():
  3.  
  4. Task 1:
  5.  
  6. Create a text file "config.txt" with notepad and put a single line of text in the file.
  7. Create a simple program which opens text file called "config.txt" when it starts
  8. The program should read the contents of the text file (one line at a time) and
  9. Display each line of text in the console window.
  10. Note: the program must contain error handling appropriate for File IO, this must include graceful recovery/exit if the file is not found.
  11.  
  12.  
  13.  
  14.  
  15. 2.22.3 File Practice Activity 2
  16. Review the API documentation for createWriter() and createReader():
  17.  
  18. Task 1:
  19.  
  20. Modify your Interactive Menu Program such that.
  21. It Opens/creates a text file called "mscoord.txt" upon startup.
  22. When the mouse is clicked, write out the X,Y coordinate of the mouse to a text file.
  23. Task 2:
  24.  
  25. Further modify your Interactive Menu Program such that.
  26. Upon startup, it opens/reads a text file called "config.txt".
  27. The format of the "config.txt" file is repeating where each line contains the following info:
  28. <menu item text>,<99>,<99>,<99>
  29. where
  30. <menu item text> - represents the menu item to show on the main screen
  31. <99> - are numerical values representing the RGB color codes for the second level screen
  32. Your program should "dynamically" construct the primary menu screen using the information read from the text file.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement