Git Product home page Git Product logo

java-app-examples's Introduction

Java

Intermediate and Advanced Java Application Examples

This repository contains examples that you can use to test out Java with. Each package contains a small application that should run on most any operating system that supports Java desktop or server environments. The repository serves two primary purposes:

  1. A code-snippet store for my reference
  2. Code examples for aspiring Java developers that want something more than just "Hello World" to play with.

All of the examples are either labs, dev-book problems, or common application needs I've run across. While the problem source may differ, I wrote all of the solutions as presented in the repository. As time allows, more advanced topics will be added.

Required Tools

All of the applications were written using Eclipse Oxygen, IntelliJ IDEA or NetBeans.

The Java version used for both Windows and Linux (at the time of testing) was Version 8 Update 151. No external libraries are needed nor used unless otherwise noted.

Classification

Unlike my dotnet-core-example respository, the Java examples provide both Console and Graphical examples. Additionally, the code complexity moves from Intermediate to advanced rather quickly. However, the same simplistic classification (from a new developer standpoint) exists. Professional and experienced OOP Developers should consider the examples intro-level. New Developers, or those switching over to OOP Development could think of them in terms of:

  • Intermediate - employs things such as structures, and methods from outside of the main method, in addition to simple class instantiation.

  • Advanced - implements main methods, Class objects, interfaces, abstract classes and methods, IS-A relationships (Inheritance), Has-A relationships (association), or any combination thereof.

The code for each application is Verbose, meaning, shortcuts and advanced concatenations have been kept to a minimum to allow for easier readability. Code comments are also brief, but should suffice for most readers.

For easy separation of classes, each application has its own package. Each program collection also has its on "Driver" (entry point). Most often, the name takes the form of (AppName)Driver.java. On occasion, the entry point is simply named Driver.java

How to Run Examples

The easiest way to run the applications is from an IDE. Simply import the projects (ConsoleApps and GuiApps) into your IDE, browse to the src/ folder, then expand the package you want to test. This is true for both console and UI packages.

Example List

Graphical Interface Examples

Console Application Examples

  • (Intermediate) Salary Tests - is a simple test application. It employs class instantiation, and static methods to test three different conditions.

  • (Intermediate) Airline Reservation - is a single-file seat assignment app. It employs boolean arrays, input scanners, random number generators, and static methods.

  • (Intermediate) Calculate Sales - is a product sales calculator. It employs an input scanner, while-loops, for-loops, switch, and if-else statements.

  • (Intermediate) Hourly Salary - is a pay calculator that allows for multi-employee input. It employs an input scanner and while-loop.

  • (Intermediate) Parking Garage - is a parking fee calculator. It employs an input scanner, while-loop and it-statements.

  • (Advanced) Animal Sighting - is an application that counts animal sightings and prints the totals. It uses ArrayLists, input scanners, while-loops, class instantiation, Object, hashCode, and toString overrides.

  • (Advanced) Domain Purchase - in an invoicing example application. It implements an Interface, Abstract Method, random generator, for-loops, and static methods.

  • (Advanced) Gross Pay - is a gross pay calculator that uses three different pay types: S=Salary, H=Hourly, C=Commission. It extends (has-a) an Employee class, uses an Abstract Method, for-loops, and switch statements.

  • (Advanced) Radio Station - is a station inventory and cost application. It employs class instantiation, ArrayLists, and if-else statements.

java-app-examples's People

Contributors

ki7mt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.