Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2.22.2 File Practice Activity 1
- Review the API documentation for createReader():
- Task 1:
- Create a text file "config.txt" with notepad and put a single line of text in the file.
- Create a simple program which opens text file called "config.txt" when it starts
- The program should read the contents of the text file (one line at a time) and
- Display each line of text in the console window.
- Note: the program must contain error handling appropriate for File IO, this must include graceful recovery/exit if the file is not found.
- 2.22.3 File Practice Activity 2
- Review the API documentation for createWriter() and createReader():
- Task 1:
- Modify your Interactive Menu Program such that.
- It Opens/creates a text file called "mscoord.txt" upon startup.
- When the mouse is clicked, write out the X,Y coordinate of the mouse to a text file.
- Task 2:
- Further modify your Interactive Menu Program such that.
- Upon startup, it opens/reads a text file called "config.txt".
- The format of the "config.txt" file is repeating where each line contains the following info:
- <menu item text>,<99>,<99>,<99>
- where
- <menu item text> - represents the menu item to show on the main screen
- <99> - are numerical values representing the RGB color codes for the second level screen
- 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