InCollege Software Engineering Project - Log In, Part 1
A console-style COBOL application (GnuCOBOL) implementing:
- New account creation (max 5 accounts, password validation)
- Login (unlimited attempts)
- Post-login navigation (job search / find someone / learn a skill), all "under construction"
- Persistence of accounts across runs
- Dual output: everything shown on screen is also written, verbatim, to an output file — and every simulated user input is written to that same output file (but not echoed to the screen), per spec.
InCollege.cob— the program sourceInCollege-Input.txt— sample input file (one simulated user entry per line)InCollege-Output.txt— the output produced by running the program against the sample inputInCollege-Accounts.txt— persistence file (created/updated automatically by the program; safe to delete to reset to zero accounts)
Requires GnuCOBOL (gnucobol4 package on Ubuntu/Debian: apt-get install gnucobol4).
cobc -x -free InCollege.cob -o InCollege-xbuilds an executable (not just a module)-freetells the compiler the source uses free-format (the source starts with>>SOURCE FORMAT FREE)
InCollege-Input.txt must sit in the same directory as the compiled InCollege executable. Put one simulated "typed" value per line, in the exact order the program will ask for it. For example, to create an account and log in:
2
jsmith
Pass123!
1
jsmith
Pass123!
4
Line-by-line meaning above: 2 = choose "Create New Account", then username, then password; 1 = choose "Log In", then username, then password; 4 = choose "Logout" from the post-login menu.
Menu inputs the program understands:
- Top menu:
1= Log In,2= Create New Account - Post-login menu:
1= Search for a job,2= Find someone you know,3= Learn a new skill,4= Logout - Learn-a-skill submenu:
1–5= pick a skill,6= Go Back
Important — unlimited login attempts: if a login attempt fails, the program does NOT return to the top menu; it immediately re-prompts for username/password again (per spec, "unlimited attempts" happens inside the login flow). Keep this in mind when laying out lines in the input file, since the next two lines will always be consumed as the next username/password guess.
After running:
./InCollegeTwo things are produced:
- Everything is printed live to the terminal (standard output).
- The identical screen output — plus every simulated input line — is written to
InCollege-Output.txtin the same directory.
InCollege-Accounts.txt is also written/updated automatically; it's the persistence file and is read back in on the next run so previously created accounts still work.
- Password validation (2120-VALIDATE-PASSWORD): 8–12 chars, and requires at least one uppercase letter, one digit, and one non-alphanumeric character. On failure the student is re-prompted for a new password (they keep their already-accepted username) rather than starting the whole registration over.
- Account limit: implemented as "6th account already exists" (
WS-ACCOUNT-COUNT >= 5) rather than a separate attempts counter, since every valid attempt fills a slot — functionally identical to "the 6th attempt" as worded in the spec, as long as attempts that fail validation don't consume a slot (they don't, in this implementation). - "Learn a New Skill" list: the 5 skills are invented per the assignment's instructions (Excel, Public Speaking, Python Programming, Data Analysis, Networking) — swap in
WS-SKILL-TABLEif your team wants different ones. - Logout on the post-login menu: the spec explicitly calls for a Logout option on the "top level" (post-login) menu, so a 4th item was added there even though the sample transcript in the spec doesn't show it being exercised.
- Screen vs. file content: per the spec's explicit note, prompts/messages are shown on screen and also written to the file, but raw user input is written to the file only (never printed back to the screen), matching the sample transcript, which never echoes what was typed.
1000series — startup, shutdown, persistence load/save2000series — top-level menu, account creation, password/username validation, login3000series — post-login menu, learn-a-skill submenu9000series — shared I/O helpers (9100dual display+write,9200read+echo-to-file)