Skip to content

m2ammar/Java-console-projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Java Console Projects

Two standalone Java console applications built to practice core OOP concepts — object state management, encapsulation, control flow, and file I/O — without the added complexity of a GUI or MVC layer.


1. ATM System (src/ATM.java)

A command-line ATM simulator supporting multiple user accounts, login/registration, and standard banking operations.

Features:

  • Register a new account (Current or Savings) with a name and PIN
  • Login with name + PIN authentication
  • Check balance
  • Deposit funds
  • Withdraw funds (with insufficient-funds handling)
  • Logout and return to the main menu
  • Runs in a loop until the user chooses to exit

Concepts practiced:

  • Encapsulation via an Account class (name, password, balance, and behavior bundled together)
  • Static ArrayList<Account> acting as an in-memory shared data store across the app
  • Input validation loops for menu choices
  • Scanner buffer handling (nextLine() after nextInt()/nextDouble())

How to run:

javac ATM.java
java ATM

2. File Organizer (src/FileOrganizer.java)

A utility that scans a given folder and automatically sorts files into subfolders based on their file extension (currently supports .txt and .csv).

Features:

  • Prompts for a folder path and validates it exists before proceeding
  • Skips subdirectories — only processes files
  • Skips files with no extension
  • Auto-creates destination subfolders (e.g. txt/, csv/) if they don't exist
  • Reports how many files were successfully moved

Concepts practiced:

  • File I/O using Java's File class (listFiles(), renameTo(), mkdir())
  • String manipulation for extension extraction (lastIndexOf, substring)
  • Defensive coding — handling empty folders, invalid paths, and missing extensions gracefully

How to run:

javac FileOrganizer.java
java FileOrganizer

Notes

Both projects are intentionally simple, GUI-free console apps — the focus was writing clean, correctly-encapsulated, edge-case-aware logic rather than adding UI complexity.

Related Projects

Earlier programming fundamentals practice (pre-OOP, procedural style) — part of the Mini_Apps repo:

About

Two Java console apps (ATM & File Organizer) built to practice OOP fundamentals — clean class design, file I/O, and input handling.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages