Explore Java & Analytics project walkthroughs
Try the workflows, inspect the inputs and explain how the results are produced.
These are teaching examples created for this website using synthetic data. They are not student submissions, live patient records or actual dealership results.
OPD queue: follow a token from arrival to completion
The runnable Java console application uses a FIFO queue, an active token and a completion counter. No names or clinical information are needed.
Interactive workflow preview: this browser simulation runs in JavaScript. Download the Java source below to compile and run the actual Java console example.
Start by adding a sample token.
Waiting order: Empty
What to inspect and explain
- Data structure:
Queue<Integer>withArrayDequeretains arrival order. - State transitions: add → waiting → active → completed; finish an active token before calling another.
- Validation: an empty queue returns no token; reset clears the demonstration.
- Scope: this console sample demonstrates queue logic. It does not include Spring Boot, a database, authentication or a production clinic workflow.
Compile, run and test the Java application
javac OpdQueueDemo.java java OpdQueueDemo java OpdQueueDemo --self-test java OpdQueueDemo --interactive
Use JDK 17. Interactive commands: add, next, complete, status, reset, quit.
Dealership sales: from rows to a filtered dashboard
Use 18 synthetic monthly region/model rows. Change a filter and reconcile the dashboard against the downloadable CSV.
| Model | Units | Revenue |
|---|
Recreate and explain the analysis
- Check the data: one row represents a month, region and model. Confirm unique combinations, positive units and valid prices.
- Calculate: revenue = units × unit price; average vehicle value = total revenue ÷ total units.
- Investigate: compare model mix across regions/months. Explain the effect of filters before drawing conclusions.
- Reconcile: the SQL and DAX examples use the same definitions. Check dashboard totals against the CSV.
- State limitations: the example excludes discounts, tax, returns and costs, so its revenue is not profit.
This is a working browser dashboard. The downloadable DAX examples explain how to recreate its measures in Power BI; a Power BI report file is not supplied.