README.md

IT Term 1: Java and SQL practice

IT coursework for Term 1. Most folders are separate Java exercises built in NetBeans. CharacterBuilding uses Maven, and !Databases contains BaggageDB and WeddingDB for Access practice.

The exercises cover variables and data types, escape sequences, operators, type conversion, the Math class, random numbers, dialog boxes, simple Swing forms, and basic database concepts.

What this repo contains

  • Standalone Java mini-projects for class exercises and homework.
  • Assessment folders under Tests/ for term tasks and practical questions.
  • Access databases in !Databases/BaggageDB.mdb and !Databases/WeddingDB.mdb.
  • Mostly NetBeans/Ant project structure, plus one Maven project.

There is no single application entry point for the whole repo. Each folder is intended to be opened and run on its own.

Project overview

FolderFocus
AftermathCircle area calculation using JOptionPane, Math.PI, Math.pow, and a random radius.
ArmathgeddonSquare roots, cube roots, and generating a random 4-digit PIN.
ChangeIsGoodType conversion between String, int, double, char, and boolean.
CharacterBuildingCharacter literals and Unicode-style numeric character values.
DataTypesPrimitive/reference data types, reassignment, formatted output, and a simple object example.
DiceRollerSimulates rolling two dice and totals the result.
escapesequencesA single-file example showing Java escape sequences and console formatting.
FullCircleCalculates the area of a circle from a user-entered radius.
HighsAndLowsCompares two numbers with Math.max and Math.min.
IveGotThePowerRaises a number to a power using Math.pow.
JavaMathsBasic arithmetic, integer division, double division, and modulus.
LoginCheckSimple login validation in both dialog-based and Swing GUI form versions.
MessageDialogsBasic JOptionPane message dialog examples.
NobodyPutsPythagorusInACornerPythagorean theorem calculation for a triangle hypotenuse.
RandomGeneratorPrints raw Math.random() values.
RandomPracticePractices converting Math.random() into different numeric ranges.
RealAltitudeUses Math.abs to convert an altitude reading to distance from sea level.
SeeYouRoundDemonstrates rounding and calculates a VAT-inclusive price.
SomethingRandomExperiments with loops, repeated random numbers, and phone-number-style output.
Tests/JavaTest1Practical test work covering output, variables, user input, and integer arithmetic.
Tests/Term1Term assessment practice using variables, totals, and formatted output.
Tests/Term1_v2Expanded term assessment with dialogs, age calculations, division/remainder, and charAt.
UserInput_User input with JOptionPane and a simple booking confirmation message.
!DatabasesBaggageDB and WeddingDB Access exercises.
JavaApplication2January console-output exercise recovered from a laptop backup.
JavaApplication212Additional recovered Java exercise.

Topics covered

  • Java syntax and program structure
  • Variables, literals, and data types
  • Escape sequences and console output formatting
  • Arithmetic operators and modulus
  • Type casting and parsing
  • Math methods such as pow, sqrt, cbrt, round, abs, max, and min
  • Random number generation with Math.random()
  • GUI input/output with JOptionPane
  • Introductory Swing form design
  • Simple conditional logic for validation
  • Basic database practice with Microsoft Access

Running the projects

NetBeans / Ant projects

Most folders in this repo are NetBeans projects with a build.xml file. The easiest way to run them is:

  1. Open the specific project folder in NetBeans.
  2. Run the main class for that project.

Examples include Aftermath, DiceRoller, LoginCheck, and the assessment folders in Tests.

If you prefer the command line, these NetBeans projects are Ant-based, so running from inside an individual project folder is the usual approach:

bash
1ant run

Maven project

CharacterBuilding is set up as a Maven project rather than an Ant project.

bash
1cd CharacterBuilding
2mvn package

Note: CharacterBuilding/pom.xml is currently configured with maven.compiler.release set to 25, so you may need a matching JDK if you build it exactly as-is.

Single-file example

escapesequences/EscapeSequences.java can be run directly using the commands below. The folder also has NetBeans project files.

bash
1javac -d . escapesequences/EscapeSequences.java
2java escapesequences.EscapeSequences

Database files

Open !Databases/BaggageDB.mdb in Microsoft Access or another tool that supports .mdb files.

Repo notes

  • This is a learning repository, so the projects are intentionally small and focused on one concept at a time.
  • The code includes both console output and GUI-based input/output exercises.
  • Some folders contain generated build output locally, but the real source work lives under each project's src/ folder.
  • LoginCheck is a classroom validation example with hardcoded credentials, not a production authentication system.

Recovery notes

The recovered set has 25 projects with Java source. All compiled with JDK 26 during recovery; CharacterBuilding was checked with javac, without testing Maven packaging. Both databases opened successfully. The old UserInput folder had no recoverable source; UserInput_ is present.

Build output, machine-specific settings, and local recovery copies are excluded from Git.