Laboratory Exer - File Handling3
Laboratory Exer - File Handling3
ACTIVITY
Computer Programming 2
Task Performance
User Log-in
Programming Activity
Objectives
Create a program that handles
exception and allows writing to and
reading from a text file.
Instruction
• Select a partner to be part of the activity.
• One of you will help research for code for trial and error
and one of you will do the main program.
• At the end of the class, both of you will pass the same
project.
• Each group will be evaluated with 10 is the highest score
base on how far is your development.
• Absent member will not have score during evaluation.
Sample Layout
PROCEDURE
1. Create a folder named
LastName_FirstName (ex. Reyes_Mark)
in your local drive D:
2. Create a new project named LastName1
LastName2 _FileHandling1X. Set the
project location to your own folder.
PROCEDURE
3. Write a program that will:
Ask the user to select between two (2) options:
• Register: User shall input his desired username and password.
These shall be saved in a text file named records.txt. Only
alphanumeric characters are allowed.
Username: test
Password: test
Username: test
Password: test
Username: test1
Password: test1
Display YES NO
If credentials Display
Success match error
DATA FLOW : REGISTER
REGISTER
WRITE Data to
Record.txt
Display
Success