Project 3: Overview
In this project, youβll continue developing your Analyzer application by expanding its functionality and code design. Youβll design and implement new analyzers, deepen your object-oriented programming skills, and refine your ability to explain and reflect on your work.
Project 3 has four stages:
- Plan β Understand requirements, update your design, and prepare pseudocode.
- Build β Add
TokenLengthsAnalyzerandTokenLocationSearchAnalyzer; then create two web apps (HTTP Request + Properties) using MVC. - Submit & Reflect β Finalize your code, capture evidence (screenshots), push to GitHub, and complete your reflection.
- Code Review β Walk through your updated code with your instructor, explaining your design and decisions.
Part 1 β Plan
-
Update your class diagram to include:
- TokenLengthsAnalyzer
- TokenLocationSearchAnalyzer.
-
Write pseudocode
processToken()method in the TokenLengthsAnalyzer. - Write pseudocode
processToken()method in the TokenLocationSearchAnalyzer. - Create pseudocode βtestsβ to trace how tokens are processed and counted in the
processToken()method in the TokenLengthsAnalyzer. - Create pseudocode βtestsβ to trace how tokens are processed and counted in the
processToken()method in the TokenLocationSearchAnalyzer.
π¦ Deliverables: Updated class diagram screenshot, plan-pseudocode file with tests, GitHub issue βProject 3 plan ready for review.β
Heads-up: You need a MET on the plan before coding. If itβs clear code was written first, the plan may be marked Not Yet.
Part 2 β Build
Analyzer -- continued!
TokenLengthsAnalyzer
- Determine the token lengths and count.
- Write to
output/token_lengths.txtin two columns
TokenLocationSearchAnalyzer
- Load search terms from
config/search-tokens.txt - Determine if search token is in the input file and record it's location.
- Write to
output/token_locations.txtwith a 80 character limit.
Add Properties:
- Update analyzer.properties with the new output paths
output.file.token.lengths
Deliverables: New analyzers implemented, program runs successfully, tests pass.
Your Java112 web application
HTTP Request App
- JavaBean (HttpRequestData): store request info (method, URI, URL, protocol, server name/port, locale, query string, queryParameter, and User-Agent).
- Servlet (HttpRequestServlet): populate bean from request, attach to request attributes, forward to JSP.
- JSP (httpRequestData.jsp): match site design, list all bean values using EL.
Properties App
- JavaBean File (project3.properties): add entries for author name/email, course title & format, instructor, project description.
- Servlet (PropertiesServlet): load properties in init(), attach to request, forward to JSP.
- JSP (project3Properties.jsp): match site design, display properties in a 2-column table (property name β value).
π¦ Deliverables: Updated index.jsp with links to both servlets, HttpRequestServlet and PropertiesServlet. Screenshots of pages and corrects outputs.
Part 3 - Submit & Reflect
Go to Project 2 Submission & Reflection
- Screenshots: Save required images under
screenshots/project-3 - Push to GitHub: Stage β commit β push.
- Open an issue: βProject 3 ready for reviewβ and complete the reflection prompts.
- Optional: If doing the live review later, you can schedule or record now.
Deliverables: Screenshots, GitHub repo updated, reflection completed.
Part 4 β Code Review
- Walkthrough (~10 min):
- Show Analyzer changes (two new analyzers).
- Show web applications (MVC flow from servlet β bean β JSP).
- Be ready to answer: debugging example, best practice, programming principle, OOP concept, and collections usage.
Deliverables: Code review completed, notes saved, corrections made if needed.
You need to complete 2 code reviews to pass the course. If you are in an in-person class, code-reviews can be completed during class time.
Pro Tips
- Plan first, code smarter. Your pseudocode and diagrams save debugging later.
- Efficiency matters. The
bigFile.txtmust run in under 15 seconds. - Use properties. No hard-coded filenames, pull from
.propertiesfiles. - Use the MVC. Keep logic in beans/servlets, not in JSPs.
- Test everything. Validate outputs on small + big files and web pages.
- Commit often. Frequent commits!!
By the end of Project 3, youβll have:
- A high-performance Analyzer with two new analyzers.
- A working Java web app with MVC (Servlets, JSPs, JavaBeans).
- A polished submission with screenshots and reflection.
- Confidence presenting your code, both CLI and web, in a code review.