Skip to main content

Learning Resources

Projects

A curated set of Java project ideas from beginner to capstone. Each idea lists the features to implement, a realistic time estimate, and the exact concepts required — every concept linked to its lesson.

Project Ideas

Java Projects — Ideas & Concepts Required

26 project ideas from your first console program to portfolio-grade OOP, collections, and concurrency work. Each idea has a brief, features to implement, the exact Java concepts it exercises (linked to lessons), and a time estimate — plus a build guide with suggested classes, step-by-step milestones, a sample run, stretch goals, and the question an interviewer is likely to ask about it.

Which Project Should I Build?

If your goal is…Start with
Your first program after loopsNumber Guessing Game or ATM Simulator
Practise arrays and methodsStudent Marks Analyser
Learn file handlingExpense Tracker or Contact Book
Show OOP in interviewsBank Account Hierarchy or Employee Payroll
Prepare for low-level design roundsParking Lot System and Library Management
Show Collections masteryWord Frequency or Inventory Management
Show concurrencyTask Queue + Worker or Concurrent Download Simulator
One portfolio showpiecePersonal Finance Manager or Hotel Room Booking

Build at least one project from each tier. For placements, two solid projects — one OOP-heavy, one Collections- or concurrency-heavy — with clean READMEs are worth more than ten half-finished ones.

Beginner Projects

After Phase 2 · 6 projects

Console programs that need I/O, decisions, loops, arrays/strings, and methods. Finish one in a sitting and put it on your resume early.

Menu-Driven Calculator 4–6 hrs

A looping calculator with arithmetic, power, and percentage — practice clean menus and Scanner validation in Java.

Features to implement

  • Numbered menu that repeats until quit
  • Divide-by-zero and bad-input handling
  • Optional history of last N results

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Calculator — Static methods: add, subtract, multiply, divide, power, percent
  • History — Keeps the last N results in an array (circular buffer)
  • CalculatorApp — main loop — shows the menu, reads input, prints results

Build it step by step

  1. Print the menu and read a choice inside a do-while loop.
  2. Write one method per operation and call it from a switch.
  3. Validate numbers with hasNextDouble() and reject division by zero.
  4. Add the history array and a Show history option.
  5. Format every result with printf to two decimal places.

Sample run

1 Add  2 Subtract  3 Multiply  4 Divide  5 Power  0 Exit
Choice: 4
First number: 10
Second number: 0
Error: cannot divide by zero
Choice: 5
First number: 2
Second number: 10
Result: 1024.00

Stretch goals

  • Parse a full expression such as 12 + 7 * 2
  • Add square root and modulus
  • Save history to a file on exit

Interview angle: Explain how invalid input is handled without crashing — hasNextDouble() plus a retry loop.

Number Guessing Game 3–4 hrs

Computer picks a secret number; player guesses with higher/lower hints and a score by attempts.

Features to implement

  • Random number generation
  • Difficulty levels
  • Play-again loop

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • GuessingGame — Secret number, attempts, and the check(guess) logic
  • GameApp — Difficulty menu, play-again loop, best score

Build it step by step

  1. Generate the secret with random.nextInt(range) + 1.
  2. Loop: read a guess, print Too high / Too low, count attempts.
  3. Stop when the guess is right or attempts run out.
  4. Add Easy (1–50), Medium (1–100), and Hard (1–500) levels.
  5. Track the best score across rounds.

Sample run

Level (1 Easy, 2 Medium, 3 Hard): 2
Guess (1-100): 50
Too high!
Guess (1-100): 25
Too low!
Guess (1-100): 37
Correct! You took 3 attempts. Best: 3
Play again? (y/n): n

Stretch goals

  • Warmer / colder hints based on distance
  • Save the high score to a file
  • Reverse mode: the computer guesses your number with binary search

Interview angle: Why binary search needs at most 7 guesses for 1–100 (log₂100 ≈ 6.6).

Pattern Printing Studio 3–5 hrs

Prints pyramids, diamonds, and number patterns of user-chosen size with a tidy menu.

Features to implement

  • At least eight patterns
  • User-controlled size
  • Methods per pattern

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Patterns — One static method per pattern, each taking a size n
  • PatternApp — Menu, size input, and dispatch to the right method

Build it step by step

  1. Start with a right triangle of stars using two nested loops.
  2. Add the pyramid: a spaces loop and a stars loop per row.
  3. Build the diamond from an upper and a lower pyramid.
  4. Add number patterns such as Floyd and Pascal triangles.
  5. Wire everything into a menu with size validation.

Sample run

Pattern (1 Triangle, 2 Pyramid, 3 Diamond): 2
Size: 4
   *
  ***
 *****
*******

Stretch goals

  • Hollow versions of each shape
  • Let the user choose the character
  • Write the pattern to a text file

Interview angle: Describe how the row number decides the count of spaces and stars in each line.

Unit Converter 3–5 hrs

Converts temperature, length, and currency categories with formatted output.

Features to implement

  • Category menu
  • Two-way conversion
  • printf decimal formatting

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Converter — Static conversion methods per category
  • ConverterApp — Category menu, from / to units, formatted output

Build it step by step

  1. Pick three categories: temperature, length, and weight.
  2. Convert through a base unit (metre, kilogram) so you avoid n × n formulas.
  3. Read the value and units, and validate them.
  4. Print results with printf("%.3f").
  5. Add a reverse-conversion shortcut.

Sample run

Category (1 Temperature, 2 Length, 3 Weight): 1
From (C/F/K): C
To (C/F/K): F
Value: 37
37.000 C = 98.600 F

Stretch goals

  • Store conversion factors in an enum
  • Load currency rates from a file
  • Convert a whole list of values at once

Interview angle: Why converting through a base unit keeps the code short and easy to extend.

Student Marks Analyser 5–7 hrs

Read marks for a class into an array, compute average/topper, and print a grade sheet.

Features to implement

  • Input validation
  • Average and rank list
  • Pass/fail summary

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • MarksAnalyser — average, highest, lowest, grade(mark), rank list
  • MarksApp — Reads the class and prints the report

Build it step by step

  1. Read the student count, then fill names[] and marks[].
  2. Compute total, average, highest, and lowest in one loop.
  3. Assign grades with an else-if ladder.
  4. Sort an index array by marks to build the rank list.
  5. Print a neat table with printf.

Sample run

Name        Marks  Grade
Asha           92  A
Ravi           78  B
Kiran          55  D
Average: 75.00  Topper: Asha  Passed: 3/3

Stretch goals

  • Five subjects per student in a 2D array
  • Read the class from a CSV file
  • Grade histogram drawn with stars

Interview angle: How names and marks stayed aligned while sorting — an index array, or a small Student class.

ATM Simulator 4–6 hrs

PIN login, balance enquiry, deposit, withdrawal, and a mini statement in a looping console menu.

Features to implement

  • Three PIN attempts, then the card is blocked
  • Withdrawals in multiples of 100 with a balance check
  • Mini statement of the last five transactions

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Atm — balance, pin, failed attempts, last five transactions array
  • AtmApp — Login, menu loop, and exit

Build it step by step

  1. Ask for the PIN; block the card after three wrong tries.
  2. Show a menu: balance, deposit, withdraw, mini statement, exit.
  3. Allow withdrawals only in multiples of 100 and within the balance.
  4. Record each transaction in a fixed-size array, overwriting the oldest.
  5. Add a change-PIN option with confirmation.

Sample run

Enter PIN: ****
1 Balance  2 Deposit  3 Withdraw  4 Mini statement  0 Exit
Choice: 3
Amount: 2550
Amount must be a multiple of 100
Amount: 2500
Please collect your cash. Balance: 7,500.00

Stretch goals

  • Several accounts selected by card number
  • Daily withdrawal limit
  • Note dispensing: count of 500, 200, and 100 notes

Interview angle: How the transaction array keeps only the last five entries (circular index with %).

Intermediate Projects

After Phase 3 · 5 projects

Projects that combine strings, wrappers, files, packages, and clearer modular design — still mostly console, but they feel like real tools.

Text Analyser 6–8 hrs

Analyse a paragraph or file for word count, unique words, and frequency — a warm-up for HashMap later.

Features to implement

  • Word and sentence counts
  • Frequency table
  • Case-insensitive option

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • TextStats — Counts words, sentences, characters, and vowels
  • FrequencyCounter — Word → count table (parallel arrays now, HashMap later)
  • AnalyserApp — Reads text from the keyboard or a file and prints the report

Build it step by step

  1. Read the text with Scanner or Files.readString.
  2. Lower-case it, remove punctuation with replaceAll, and split on whitespace.
  3. Count sentences by the . ! ? characters.
  4. Count word frequencies and print the top five.
  5. Report the longest word and average word length.

Sample run

Words: 128  Sentences: 9  Characters: 712
Top words: the(11) java(7) is(6) a(5) code(4)
Longest word: encapsulation  Average length: 4.6

Stretch goals

  • Ignore stop words such as the, a, is
  • Estimated reading time
  • Common words between two files

Interview angle: How words were normalised (case and punctuation) so Java and java count as one word.

Quiz Application 7–9 hrs

Multiple-choice quiz with a question bank, live scoring, and a review screen.

Features to implement

  • Array/file-based question bank
  • Score tracking
  • Optional file-loaded questions

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Question — Text, four options, correct index
  • QuestionLoader — Reads questions from a text file
  • QuizEngine — Shuffles, asks, scores, and remembers wrong answers
  • QuizApp — Menu and result screen

Build it step by step

  1. Create the Question class and hard-code five questions.
  2. Loop through them, read A–D, and keep the score.
  3. Show a review of wrong answers with the correct option.
  4. Load questions from a file instead of code.
  5. Shuffle the order and add a time limit per quiz.

Sample run

Q3. Which keyword prevents a method from being overridden?
 A) static   B) final   C) private   D) const
Your answer: B
Correct!  Score: 3/3

Stretch goals

  • Categories and difficulty levels
  • High-score file with player names
  • Negative marking

Interview angle: Why question data (Question) is separated from quiz logic (QuizEngine).

Tic-Tac-Toe (Two Player) 6–8 hrs

Console board game with win/draw detection and invalid-move handling.

Features to implement

  • 3×3 board rendering
  • Win and draw detection
  • Replay option

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Board — char[3][3] grid; place(), isFull(), print()
  • WinChecker — Checks rows, columns, and both diagonals
  • Game — Turn loop, player switching, replay, score

Build it step by step

  1. Print an empty 3×3 board with row and column numbers.
  2. Read a move; reject out-of-range or occupied cells.
  3. Check for a win after each move with loops, not eight if statements.
  4. Declare a draw when the board is full.
  5. Track scores across rounds.

Sample run

 X | O | X
---+---+---
   | X | O
---+---+---
   |   | X
Player X wins!  Score  X: 1  O: 0

Stretch goals

  • Single-player mode: win, else block, else random
  • N×N board with K in a row
  • Unbeatable AI with minimax recursion

Interview angle: How win detection uses loops over rows and columns plus two diagonal checks.

Contact Book (File-Backed) 8–12 hrs

Add/search/list contacts stored in a text or CSV file, organised in a small package.

Features to implement

  • CRUD-lite operations
  • Search by name
  • Persist between runs

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Contact — name, phone, email with validation
  • ContactRepository — Loads and saves contacts.csv
  • ContactService — Add, search, update, delete
  • ContactApp — Menu (package com.contacts.app)

Build it step by step

  1. Create packages: model, repo, service, app.
  2. Implement add and list in memory first.
  3. Save to CSV after every change and load on start.
  4. Search by partial, case-insensitive name.
  5. Validate the phone (10 digits) and email (contains @ and a dot).

Sample run

1 Add  2 List  3 Search  4 Delete  0 Exit
Choice: 3
Name contains: ra
Ravi Kumar    9876543210  ravi@mail.com
Rashmi Rao    9123456780  rashmi@mail.com

Stretch goals

  • Reject duplicate phone numbers
  • Sort by name
  • Export to vCard format

Interview angle: How file reading and writing stays separate from the menu code (repository layer).

Expense Tracker (CLI) 8–10 hrs

Log daily expenses with categories and show totals by category from a file.

Features to implement

  • Append-only log
  • Category totals
  • Simple date string handling

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Expense — date, category, amount, note
  • ExpenseLog — Appends to and reads expenses.csv
  • Report — Totals by category and by month
  • TrackerApp — Menu

Build it step by step

  1. Fix the CSV format: date,category,amount,note.
  2. Append one line per expense with new FileWriter(file, true).
  3. Read all lines and parse amounts with Double.parseDouble.
  4. Print totals per category.
  5. Filter by month using the yyyy-MM prefix of the date.

Sample run

Category      Total
Food       2,450.00
Travel     1,200.00
Bills      3,800.00
2026-10 total: 7,450.00

Stretch goals

  • Monthly budget with an over-budget warning
  • Use LocalDate for real date handling
  • Bar chart drawn with # characters

Interview angle: How a corrupt CSV line is skipped and reported instead of crashing the program.

Advanced Projects

After Phases 4–6 · 10 projects

Design with classes, collections, files, and threads. These look strong on a resume and match typical campus / junior interviews.

Student Record OOP System 10–15 hrs

Manage student objects with encapsulated fields, file persistence, and search/sort helpers.

Features to implement

  • Class with private data + getters/setters
  • Add / display / search / update
  • Save and load from file

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Student — private id, name, marks; validated setters; toString
  • StudentRepository — ArrayList<Student> plus save / load to a file
  • StudentService — add, findById, update, delete, sort
  • StudentApp — Menu

Build it step by step

  1. Write Student with a constructor, getters, setters, and toString.
  2. Store students in an ArrayList and list them.
  3. Add search by id and update marks.
  4. Sort by name or marks with a Comparator.
  5. Save to a file and reload on start.

Sample run

ID  Name      Marks
1   Asha      92.0
2   Ravi      78.5
Sorted by marks (desc): Asha, Ravi

Stretch goals

  • HashMap<Integer, Student> for O(1) lookup by id
  • Custom StudentNotFoundException
  • Report card file per student

Interview angle: Why fields are private and how setters reject invalid marks.

Bank Account Hierarchy 12–18 hrs

Base Account with Savings/Current derived types — deposits, withdrawals, and polymorphic statements.

Features to implement

  • Inheritance hierarchy
  • Overridden interest or display
  • Transaction history list

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Account (abstract) — accountNo, holder, balance; deposit, withdraw, abstract monthlyInterest()
  • SavingsAccount — Interest rate and minimum balance rule
  • CurrentAccount — Overdraft limit, no interest
  • Transaction — type, amount, timestamp
  • Bank — Accounts by number, transfer between accounts

Build it step by step

  1. Create the abstract Account with deposit and withdraw.
  2. Override withdraw in Savings and Current to enforce their rules.
  3. Record every operation as a Transaction in a list.
  4. Print statements polymorphically for all accounts.
  5. Throw InsufficientFundsException when a rule is broken.

Sample run

SB1001 Asha  Savings  Balance: 15,000.00
CA2001 Ravi  Current  Balance: -2,000.00 (overdraft)
Transfer 5,000 SB1001 -> CA2001 ... done
Interest credited to SB1001: 50.00

Stretch goals

  • BigDecimal for exact money
  • PIN-protected login
  • Save accounts and transactions to files

Interview angle: How overriding withdraw lets each account type enforce its own rules without if-else on type.

Library Management (OOP) 15–20 hrs

Books, members, and issue/return workflow with overdue fines.

Features to implement

  • Issue and return
  • Fine calculation
  • Search by title/author

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Book — isbn, title, author, available
  • Member — id, name, borrowed books (limit 3)
  • Loan — book, member, issue date, due date
  • Library — HashMap<String, Book> by ISBN; issue, return, fines

Build it step by step

  1. Model Book and Member with encapsulated fields.
  2. Store books in a HashMap keyed by ISBN.
  3. Issue: check availability and the member limit, then create a Loan.
  4. Return: compute days late with LocalDate and charge a fine.
  5. Search by title or author; save everything to files.

Sample run

Issue 978-0134685991 to M01 ... issued, due 2026-10-23
Return 978-0134685991 on 2026-10-26 ... 3 days late, fine Rs 15
Search author "bloch": Effective Java (available)

Stretch goals

  • Reservation queue per book with Queue<Member>
  • Most-borrowed books report
  • Admin and member roles

Interview angle: Why a HashMap keyed by ISBN beats scanning a list for every lookup.

Shape Area Toolkit 8–12 hrs

Abstract Shape (or Drawable interface) with Circle/Rectangle overrides — classic polymorphism demo.

Features to implement

  • Abstract area/perimeter
  • List of Shape references
  • Interface + default method optional

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Shape (abstract) — abstract area() and perimeter(); describe()
  • Circle, Rectangle, Triangle — Override area and perimeter; validate in constructors
  • Drawable (interface) — draw() with a default method
  • ShapeApp — Builds a List<Shape> and prints totals

Build it step by step

  1. Write the abstract Shape class.
  2. Implement three subclasses with constructor validation.
  3. Store mixed shapes in a List<Shape>.
  4. Print each area polymorphically and the total.
  5. Sort shapes by area with Comparator.comparingDouble.

Sample run

Circle(r=2.0)        area 12.57  perimeter 12.57
Rectangle(3.0x4.0)   area 12.00  perimeter 14.00
Triangle(3,4,5)      area  6.00  perimeter 12.00
Largest: Circle

Stretch goals

  • Square extends Rectangle — discuss why it can break expectations
  • Read shapes from a file
  • Rewrite with a sealed interface and records

Interview angle: Show dynamic dispatch: a Shape reference calling Circle.area() at runtime.

Employee Payroll System 12–16 hrs

Full-time and contract employees with different pay rules under one interface.

Features to implement

  • Polymorphic pay()
  • Static employee count
  • Report printing

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Payable (interface) — double pay()
  • Employee (abstract) — id, name; static counter for ids
  • FullTimeEmployee — Monthly salary + allowances − tax
  • ContractEmployee — Hourly rate × hours worked
  • Payroll — List<Payable>, report printing

Build it step by step

  1. Define Payable and the abstract Employee.
  2. Implement two employee types with their own pay rules.
  3. Generate ids with a static counter.
  4. Print payslips sorted by pay.
  5. Show department totals with a HashMap.

Sample run

E1 Asha  Full-time  Pay: 58,500.00
E2 Ravi  Contract   Pay: 32,000.00 (160 hrs x 200)
Total payroll: 90,500.00  Employees: 2

Stretch goals

  • Intern type with a fixed stipend
  • Payslip file per employee
  • Tax slabs loaded from a config file

Interview angle: Why adding a new employee type needs no change in Payroll (open for extension).

Word Frequency & Unique Vocab 8–12 hrs

Count word frequencies with HashMap and unique words with HashSet; optional top-N report.

Features to implement

  • Normalise case/punctuation
  • Frequency map
  • Unique-word set

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • TextCleaner — Lower-cases words and strips punctuation
  • WordCounter — Map<String, Integer> counts and Set<String> unique words
  • FrequencyApp — Reads a file and prints the top N

Build it step by step

  1. Read the file line by line.
  2. Clean each word and skip empty strings.
  3. Count with map.merge(word, 1, Integer::sum).
  4. Collect unique words in a HashSet (and a TreeSet for sorted output).
  5. Sort entries by count, descending, and print the top N.

Sample run

Total words: 5,214  Unique: 1,032
Top 5: the=312  and=190  java=144  to=121  of=117

Stretch goals

  • Stop-word list loaded from a file
  • Two-word phrase (bigram) counts
  • Compare the vocabulary of two files

Interview angle: Complexity: O(n) to count, plus O(u log u) to sort the u unique words.

Expression Calculator (Stack) 10–14 hrs

Evaluate infix or postfix expressions using a stack and string parsing.

Features to implement

  • Tokenise input
  • Operator precedence or postfix eval
  • Error messages via exceptions

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Tokenizer — Splits input into numbers, operators, and brackets
  • InfixToPostfix — Shunting-yard algorithm with an operator stack
  • PostfixEvaluator — Evaluates with a value stack
  • CalcApp — Reads expressions until exit

Build it step by step

  1. Tokenise 3 + 4 * (2 - 1) into separate tokens.
  2. Convert infix to postfix using operator precedence.
  3. Evaluate the postfix with a Deque<Double> stack.
  4. Report mismatched brackets and division by zero with exceptions.
  5. Support multi-digit and decimal numbers.

Sample run

> 3 + 4 * (2 - 1)
Postfix: 3 4 2 1 - * +
Result: 7.0
> (5 + 2
Error: mismatched brackets

Stretch goals

  • Power operator with right associativity
  • Variables such as x = 5
  • Unary minus

Interview angle: Walk through how the operator stack enforces precedence.

Task Queue + Worker Thread 10–14 hrs

Enqueue jobs on a Queue and process them on a background thread with a synchronized hand-off.

Features to implement

  • Producer menu on the main thread
  • Worker thread consumes jobs
  • Graceful shutdown / join

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Task — id, description, simulated duration
  • TaskQueue — BlockingQueue<Task> (or wait / notify by hand)
  • Worker (Runnable) — Takes tasks and processes them
  • TaskApp — Menu that adds tasks and requests shutdown

Build it step by step

  1. Create Task and a shared queue.
  2. Start a worker thread that loops on take().
  3. Add tasks from the main-thread menu.
  4. Stop the worker cleanly with a poison-pill task.
  5. join() the worker and print a summary.

Sample run

[main]   added Task#1 resize-images
[worker] started Task#1
[main]   added Task#2 send-emails
[worker] finished Task#1 in 1.2s
[main]   shutdown requested ... worker joined, 2 tasks done

Stretch goals

  • Several workers with ExecutorService
  • Priorities with PriorityBlockingQueue
  • Retry failed tasks

Interview angle: Why BlockingQueue removes the need for manual wait / notify.

Inventory Management System 12–16 hrs

Products, stock levels, suppliers, and low-stock alerts with sorting, search, and file persistence.

Features to implement

  • Add, update, and remove products
  • Low-stock and out-of-stock report
  • Sort by name, price, or quantity

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Product — sku, name, price, quantity, reorder level
  • Supplier — id, name, contact, products supplied
  • Inventory — Map<String, Product> by SKU; stock in / out
  • ReportService — Low-stock, valuation, and sorted lists with streams
  • InventoryApp — Menu and file persistence

Build it step by step

  1. Model Product with validation (no negative price or stock).
  2. Store products in a HashMap keyed by SKU.
  3. Implement stock in and stock out; throw OutOfStockException.
  4. Low-stock report: quantity at or below the reorder level.
  5. Sort with comparators and save to CSV.

Sample run

SKU    Name            Qty  Price
P101   USB Cable        4   199.00   LOW STOCK
P102   Keyboard        25   899.00
P103   Mouse            0   499.00   OUT OF STOCK
Stock value: 26,919.00

Stretch goals

  • Purchase orders generated for low-stock items
  • Sales history with daily totals
  • Barcode-style SKU validation

Interview angle: How streams produced the low-stock and valuation reports in a few lines.

Parking Lot System (LLD) 12–18 hrs

The classic low-level design interview problem: levels, spots by vehicle size, tickets, and fees on exit.

Features to implement

  • Spot allocation by vehicle type
  • Ticket with entry time
  • Hourly fee calculation on exit

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Vehicle (abstract) — number, size; Bike, Car, Truck subclasses
  • ParkingSpot — id, size, occupied vehicle
  • Level — Free spots per size — Map<Size, Queue<ParkingSpot>>
  • Ticket — id, vehicle, spot, entry time
  • FeeStrategy (interface) — Hourly or flat pricing
  • ParkingLot — park(), leave(), availability

Build it step by step

  1. Draw the class diagram before writing code.
  2. Allocate the nearest free spot that fits the vehicle size.
  3. Issue a ticket with the entry time.
  4. On exit, free the spot and compute the fee with a FeeStrategy.
  5. Show availability per level; handle a full lot with an exception.

Sample run

Park KA01AB1234 (Car) ... Level 1, Spot C07, Ticket T1001
Park KA02CD5678 (Truck) ... Lot full for trucks
Exit T1001 after 2h 40m ... Fee Rs 60
Level 1 free: Bike 10, Car 23, Truck 2

Stretch goals

  • Multiple entry and exit gates
  • Reservations
  • Electric-charging spots

Interview angle: Justify each class and interface — this is exactly how LLD rounds are scored.

Capstone / Portfolio Projects

After the full roadmap · 5 projects

Larger builds that combine OOP, collections, files, and threads. One done well beats ten tiny demos.

Mini Console Game 20–30 hrs

Turn-based or simple grid game with entity classes, ArrayList/HashMap state, and save/load.

Features to implement

  • Entity hierarchy
  • Game loop
  • Save game to file

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Entity (abstract) — name, hp, position; abstract act()
  • Player, Enemy, Item — Subclasses with their own behaviour
  • GameMap — char[][] grid and movement rules
  • GameState — Entities, score, level; save / load
  • GameLoop — Read input, update, render

Build it step by step

  1. Draw a small grid and move the player with W, A, S, D.
  2. Add enemies that move each turn and items to collect.
  3. Give every entity an act() method (polymorphism).
  4. Save and load the game state to a file.
  5. Add levels and a high-score table.

Sample run

#########
#P..*...#
#..E....#
#.....*.#
#########
HP: 10  Score: 20  Move (w/a/s/d): d

Stretch goals

  • Enemy path-finding with BFS
  • Inventory stored in a HashMap
  • Colour output with ANSI codes

Interview angle: How the game loop separates input, update, and render.

Personal Finance Manager 20–28 hrs

Accounts, transactions, categories, monthly reports — strong OOP + HashMap/ArrayList showcase.

Features to implement

  • Multiple accounts
  • Category totals
  • Export report

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Account — name, type, balance
  • Transaction — date, amount, category, account
  • Ledger — List<Transaction> and Map<String, Account>
  • ReportService — Monthly and category reports with streams
  • Storage — CSV import and export
  • FinanceApp — Menu (package com.finance.app)

Build it step by step

  1. Model accounts and transactions in separate packages.
  2. Record income and expenses, updating balances.
  3. Monthly report grouped by category with Collectors.groupingBy.
  4. Budgets per category with warnings when exceeded.
  5. Export reports to CSV and import a bank statement.

Sample run

October 2026        Income 85,000   Expense 41,250
Rent      20,000  ##########
Food       8,400  ####
Travel     4,850  ##
Savings rate: 51%

Stretch goals

  • Recurring transactions
  • Password-protected data file
  • Charts in a JavaFX window

Interview angle: Show how streams and groupingBy built the monthly report.

Notes CLI with Tags 18–25 hrs

Create, list, search, and tag notes stored as files with an in-memory HashMap/HashSet index.

Features to implement

  • Tag search with HashSet
  • Full-text naive search
  • Args via main(String[] args)

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Note — id, title, body, tags, created
  • NoteStore — One file per note inside notes/
  • TagIndex — Map<String, Set<Integer>> — tag to note ids
  • NotesCli — Parses commands from main(String[] args)

Build it step by step

  1. Support add, list, show, and delete commands from args.
  2. Save each note as a file and rebuild the index on start.
  3. Index tags in a HashMap of HashSets.
  4. Search by tag and by text.
  5. List notes by date with a simple pager.

Sample run

$ java NotesCli add "Exam prep" --tags java,oop
Saved note #12
$ java NotesCli tag java
#7   Streams cheatsheet   [java]
#12  Exam prep            [java, oop]

Stretch goals

  • Edit notes in place
  • AND search across tags (java + oop)
  • Export all notes to Markdown

Interview angle: Why a Map of Sets makes tag search fast.

Concurrent Download Simulator 16–22 hrs

Simulate several “downloads” on worker threads, track progress in a shared map, and print a live status line.

Features to implement

  • Thread per job or a small pool
  • Synchronized progress map
  • Join all workers before summary

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Download (Runnable) — name, size, progress
  • ProgressTracker — ConcurrentHashMap<String, Integer> of percentages
  • Downloader — ExecutorService that runs the downloads
  • StatusPrinter — Prints a status line every 500 ms

Build it step by step

  1. Simulate a download with a loop and Thread.sleep.
  2. Run several downloads in a fixed thread pool.
  3. Update progress in a ConcurrentHashMap.
  4. Print the status from a scheduled task.
  5. Wait with awaitTermination and print a summary.

Sample run

file1.zip [##########] 100%   file2.iso [######----] 60%   file3.mp4 [###-------] 30%
...
All 3 downloads finished in 6.4s

Stretch goals

  • Pause and resume
  • Random failures with retry
  • Per-download speed limit

Interview angle: Why ConcurrentHashMap instead of a synchronized HashMap, and how races were avoided.

Hotel Room Booking System 22–30 hrs

Rooms, customers, and bookings with date ranges, cancellations, invoices, and saved data — a complete business app.

Features to implement

  • Availability search by check-in and check-out dates
  • Double-booking prevention
  • Invoice with taxes and cancellation rules

Concepts required

Build guide — classes, steps & sample run

Suggested classes

  • Room (abstract) — number, base price; Standard, Deluxe, Suite subclasses
  • Customer — id, name, phone
  • Booking — room, customer, check-in, check-out, status
  • BookingService — Availability by date range, book, cancel
  • InvoiceService — Nights × rate + taxes − discounts
  • HotelApp — Menu and file persistence

Build it step by step

  1. Model room types with inheritance and their own pricing.
  2. Check availability: two bookings overlap if start1 < end2 and start2 < end1.
  3. Create bookings and reject overlaps with an exception.
  4. Cancellation rules and a printed invoice.
  5. Persist rooms, customers, and bookings in files.

Sample run

Search 2026-12-24 to 2026-12-27 ... Deluxe 201, Suite 301 free
Book 201 for C12 ... Booking B5001 confirmed (3 nights)
Invoice B5001: 3 x 4,500 = 13,500 + 12% GST = 15,120.00

Stretch goals

  • Seasonal pricing
  • Room service charges on the bill
  • Occupancy report per month

Interview angle: Explain the date-overlap check and how double booking is prevented.

How to Build Any of These

StepWhat to do
1. Plan on paper List features and the classes/collections each one needs before you type a line.
2. Design types first Sketch classes and which collection owns the data. Prefer ArrayList and HashMap defaults.
3. Build one feature at a time Get “add a record” working completely before “delete” or “search”.
4. Encapsulate and validate Keep fields private. Reject bad input at the edges with exceptions or clear messages.
5. Compile with a real JDK Use javac and java (or your IDE). Treat warnings as bugs. Put types in packages as the project grows.
6. Test edge cases Empty lists, missing files, bad Scanner input, and concurrent access if you use threads.
7. Close files with try-with-resources Do not leak readers/writers. Catch checked exceptions at the boundary.
8. Write a README and push it Explain how to compile, the features, and one screenshot of it running.

Pair this page with Day 30 of the learning plan, the cheatsheet, and interview Q&A while you build.

Project Structure & README Template

Recommended folder layout

bank-app/
├── README.md
├── data/
│   └── accounts.csv
└── src/
    └── com/bank/
        ├── app/BankApp.java                 # main + menu only
        ├── model/Account.java               # data classes
        ├── model/SavingsAccount.java
        ├── service/BankService.java         # business rules
        ├── repo/AccountRepository.java      # file load / save
        └── exception/InsufficientFundsException.java

# compile and run (Linux / macOS)
javac -d out $(find src -name "*.java")
java -cp out com.bank.app.BankApp

# compile and run (Windows)
dir /s /b src\*.java > sources.txt
javac -d out @sources.txt
java -cp out com.bank.app.BankApp

README.md template

# Bank Account System (Java)

Console banking app with savings and current accounts, transfers,
and statements saved to CSV.

## Features
- Create savings / current accounts
- Deposit, withdraw, transfer with validation
- Monthly interest for savings accounts
- Statements saved to data/accounts.csv

## Concepts used
OOP (abstract classes, inheritance, polymorphism), ArrayList, HashMap,
custom exceptions, file handling, try-with-resources

## How to run
javac -d out $(find src -name "*.java")
java -cp out com.bank.app.BankApp

## Sample run
(paste 10-15 lines of real console output or a screenshot)

## What I learned / next steps
- Why withdraw is overridden per account type
- Next: JUnit tests and a MySQL backend with JDBC

Keep main thin: it should only create objects and run the menu. Business rules go in service classes, data in model classes, and file code in repository classes — the same layering used in real Spring Boot applications.

Quality Checklist & Common Mistakes

What reviewers look for

AreaCheck
StructurePackages by role (model, service, repo, app); one class, one job
EncapsulationPrivate fields, validated setters or constructors, no public mutable state
Input handlingBad input never crashes the program; clear messages and retry
ExceptionsSpecific exceptions, custom ones for business rules, no empty catch blocks
CollectionsThe right structure for the job (HashMap for lookups, List for order)
Filestry-with-resources, data survives restarts, corrupt lines handled
NamingClasses as nouns, methods as verbs, no single-letter names outside loops
ReadabilityShort methods, no duplicated code, constants instead of magic numbers
TestingEdge cases checked: empty data, zero, negatives, very large values
PresentationREADME with features, run steps, sample output; clean Git history

Mistakes to avoid

MistakeFix
Everything inside mainMove logic into classes; keep main for wiring and the menu
Public fields everywhereMake fields private and expose behaviour through methods
Copy-pasted blocks for each optionExtract methods; use polymorphism instead of long if-else chains on type
Crashing on letters typed instead of numbersCheck hasNextInt() or catch NumberFormatException and ask again
Comparing Strings with ==Use equals or equalsIgnoreCase
Using double for moneyUse BigDecimal or store paise / cents in a long
Files left openUse try-with-resources for every reader and writer
Losing data on exitSave after every change, or on a clean exit option
Huge first versionBuild one feature end to end, then add the next
No READMERecruiters skip repositories they cannot understand in 30 seconds

Questions Interviewers Ask About Your Project

  1. Walk me through your project in two minutes — the problem, the features, and your role.
  2. Draw the main classes and explain why each one exists.
  3. Why did you choose this collection (ArrayList, HashMap, Queue) for this data?
  4. Where did you use inheritance, interfaces, or polymorphism, and why?
  5. How do you handle invalid input and failures such as a missing file?
  6. What was the hardest bug, and how did you find and fix it?
  7. What is the time complexity of your search, add, and delete operations?
  8. If 1,000 users used it at once, what would break and how would you fix it?
  9. How would you test it? Which cases would you automate first?
  10. What would you add or change if you had another week?

Prepare a two-minute explanation and a class diagram for every project on your resume. Each build guide above ends with the interview angle most likely to come up for that project.

Level Up a Finished Project

Once a console version works, upgrade the same project instead of starting a new one — it shows growth and turns a student exercise into a portfolio piece.

UpgradeLearnExample
Unit testsJUnit 5 and assertionsTest BankService.withdraw for overdraft and insufficient-balance rules
Build toolMaven or GradleStandard folder layout, dependencies, and one-command builds
DatabaseJDBC with MySQL or PostgreSQLReplace CSV files with tables and SQL queries
Desktop GUIJavaFX or SwingForms and tables instead of a console menu
REST APISpring BootExpose accounts as /api/accounts endpoints for a web or mobile app
Loggingjava.util.logging or SLF4JReplace println debugging with log levels
Version controlGit and GitHubSmall commits with clear messages and a public repository