Below are many ideas for programs, including the source code and Javadoc documentation for some of them.
Area | File Name(s) | Description | Main Concepts | Challenge |
---|---|---|---|---|
math | Numbers2 | calculate sum, product, average, min, max, etc. of 2 input numbers | operators, variables | medium |
math | Numbers | calculate sum, product, average, min, max, etc. of n input numbers | iteration, arrays | medium |
math | Firstn | calculate sum, product, average of first n integers | iteration, recursion | easy |
math | Sumij | calculate sum of integers from i to j | iteration | easy |
math | Sumabc | calculate sum of numbers from a to b with step c | iteration | easy |
math | Firstnrecip | calculate sum of first n reciprocals 1/1 to 1/n | iteration, floating point | easy |
math | Circumference | calculate circumference given radius | operators, variables, PI | easy |
math | Pendulum | calculate length of pendulum given period or vice-versa | operators, variables, sqrt | medium |
math | Speed | calculate average speed given distance, time | operators, variables | easy |
math | Acceleration | calculate falling time given distance and acceleration | operators, variables, sqrt | easy |
math | Petrol | calculate kilometres per litre of petrol used on a trip | operators, variables | easy |
math | Salary | calculate salary given pay rate, hours worked, overtime rate | operators, variables | easy |
math | Coins | calculate total value of coins with different values | operators, selection | easy |
math | Temperature | convert temperatures to/from °F, °C, °K | operators, variables | medium |
math | UnitConverter | convert between various English and metric units | operators, variables | medium |
math | Quadratic | quadratic formula | math library | medium |
math | Fibonacci | calculate first n numbers of Fibonacci sequence | iteration, recursion | medium |
math | HiLo | high-low number guessing game | iteration, selection, random | medium |
math | Lock | simulation of a combination lock | random | medium |
math | OddEven | determine whether an integer is odd or even | selection, mod | easy |
math | Modulus | determine whether an integer is evenly divisible by n | selection, mod | easy |
math | Quadrant | determine quadrant of a given angle | selection | easy |
math | LeapYear | determine whether a given year is a leap year | selection | easy |
math | Calendar | print or display a calendar for a selected month or year | date | challenging |
math | Factorial | calculate factorial n! using iteration | iteration | easy |
math | Factorialr | calculate factorial n! using recursion | recursion | easy |
math | Power | calculate pow(x, n) | iteration, recursion | easy |
math | Eulerp | estimate exp(x) using n terms of a power series | iteration | medium |
math | Eulerf | estimate exp(x) to within 10-6 using factorials | iteration | medium |
math | Palindrome | check if a word is a palindrome | strings, iteration | easy |
math | Factor | print all factors of a given integer | recursion | medium |
math | Prime | print prime numbers from 1 to n | recursion | medium |
math | TimesTable | print a simple multiplication table from 1x1 to 12x12 | nested arrays | medium |
math | Determinant | calculate the determinant of a matrix (2x2 or 3x3) | 2D arrays | medium |
math | DotProduct | calculate the dot product of two matrices | 2D arrays | medium |
math | CrossProduct | display the cross product of two matrices | 2D arrays | medium |
math | Distance | calculate distance between two points (x1, y1) and (x2, y2) | operators, math library | medium |
math | Areas | calculate areas, volumes, perimeters of various 2D/3D shapes | operators, math library | medium |
math | Coordinates | convert between Cartesian (x, y) and polar (r, θ) coordinates | operators, math library | medium |
math | Area | use Monte Carlo to estimate area under curve of a(ny) function | random | challenging |
math | Raphson | calculate the root of a function with known derivative | iteration | challenging |
econ | Exchange | convert between two currencies given their exchange rate | functions | easy |
econ | Interest | calculate interest given rate, amount, term | operators | medium |
econ | Payments | calculate monthly payments on a loan | operators, iteration | medium |
econ | Depreciation | calculate depreciation of an asset for specified period | functions | medium |
econ | Values | calculate present and future values of investments | functions | medium |
econ | Returns | calculate internal rate of returns for series of cash flows | functions | medium |
stat | DataSet | store n input numbers for later statistical calculations | objects, math | medium |
stat | Mode | calculate mode (most frequently occurring) of n numbers | iteration, arrays, selection | medium |
stat | Variance | calculate variance and standard deviation of n numbers | iteration | medium |
stat | Correlation | calculate correlation coefficient of two sets of numbers | arrays, iteration | medium |
stat | Normal | calculate probability for normal distribution given a and b | iteration | medium |
stat | Poisson | calculate probability for Poisson distribution given x and n | iteration | medium |
stat | Binomial | calculate probability using binomial distribution | iteration | medium |
stat | Coin, CoinTest | simulation of tossing a coin | random | medium |
stat | Die, DieTest | simulation of tossing two dice | random | medium |
stat | Frequency | calculate letter frequency distribution in a text file | file I/O, arrays | challenging |
stat | Plot | plot a simple histogram using asterisks or graphical bars | arrays, iteration | medium |
stat | Walk | simulate a random walk in two dimensions | random, graphics | medium |
csci | Hello | display to the console "Hello, my name is <your name>" | strings, character output | easy |
csci | HelloWorldApplet | display Hello World in a Java applet | applets | easy |
csci | Case | convert an input string to all upper or lower case | strings, iteration | medium |
csci | Password | password validator/changer | strings, character I/O | easy |
csci | AsciiPic | draw a picture using print statements and ASCII characters | strings, character I/O | easy |
csci | TypeSize | display sizes of basic data types | data types | easy |
csci | Stack | stack | data structures | challenging |
csci | Queue | queue | data structures | challenging |
csci | LinkedList | linked list | data structures | challenging |
csci | Base | convert numbers to/from bin/oct/dec/hex | operators, number bases | medium |
csci | Ascii | table of printable ascii characters and oct/dec/hex | characters | medium |
csci | CharType | classify an input character as a letter, digit or whitespace | characters, selection | medium |
csci | Bitwise | display bitwise operations of two input numbers | bitwise operations | medium |
csci | Sort2 | sort two input numbers in ascending order | comparison | easy |
csci | Sort2d | sort two dates in ascending order | comparison | medium |
csci | Sortn | sort n input numbers in ascending order | sorting, recursion | challenging |
csci | Sort2s | sort two input strings in alphabetical order | strings | medium |
csci | Sortns | sort n input strings in alphabetical order | strings, sorting | challenging |
csci | Maze | traverse a maze and display the solution | recursion, 2D arrays, file I/O | challenging |
csci | Hanoi | Towers of Hanoi puzzle | recursion | challenging |
csci | Nim | The game of Nim | random numbers, I/O | medium |
csci | StrSearch | display lines in a file containing a specified string | file I/O | medium |
csci | CopyFile | create byte-by-byte copy of a text file | file I/O | medium |
csci | WordList | list words in a file; count occurrences of each word | file I/O, lists, sorting | challenging |
csci | WordCount | count characters, words and lines in a file | file I/O | medium |
csci | Flesch | calculate Flesch readability index of a text file | file I/O | challenging |
csci | TrueFalse | mark a true/false quiz question | selection | easy |
csci | Choice | mark a multiple choice quiz question | selection | medium |
csci | Salesman | given a table of distances between cities, find shortest route | 2D arrays | challenging |
csci | MediaPlayer | select and play a wav or video file | multimedia | medium |
csci | TextEditor | text editor | GUI, strings | medium |
csci | PhotoEditor | photo/image editor | GUI, graphics | medium |
csci | Draw | drawing editor | GUI, graphics | challenging |
csci | Paint | paint editor (blackboard) | GUI, graphics | medium |
csci | Clock | graphical analog clock | graphics | challenging |
csci | Animate | animation of two or more image files | graphics | medium |
csci | Transform | transformation of an image (translate, scale, rotate, shear, etc.) | graphics | medium |
csci | ColorCycle | cycle the background through all available colours | graphics | medium |
csci | ColorPick | colour selection tool | graphics | medium |
csci | ColorTable | colour table | graphics | medium |
csci | Font | change font, size and style of a text label | graphics | medium |
csci | Circle, CircleTest | calculate properties of a circle | graphics, objects | medium |
csci | ShapesApplet | display shapes of random type, size, position and colour | applets, iteration, graphics | medium |
csci | Shapes | display shapes read from a text file | applets, graphics, I/O | medium |
csci | ScreenSaver | display an artistic graphical animation (see Linux screen savers) | graphics, animation | medium |
csci | GetHTML | retrieve and display a specified HTML file from the Internet | networking | medium |
econ | BankAccount, BankAccounts |
bank accounts (also see the Horstmann examples) | objects | medium |
econ | Bank | banking system | project | |
econ | Retirement | retirement funds calculator | mathematics | project |
math | Calculator | scientific calculator | GUI, math library | project |
math | MathQuiz | mathematics operations quiz | project | |
math | LineChart | X-Y plot of data or functions using points or lines | graphics | project |
math | BarChart | bar chart of data or functions using rectangles | graphics | project |
math | Fractals | fractal drawings | graphics | project |
stat | Cards | blackjack or other card game | project | |
csci | Library | library catalogue | database | project |
csci | Database | personal contacts or inventory database | database | project |
csci | GradeBook | teacher's gradebook database with summary reports | database | project |
csci | WordQuiz | dictionary quiz (choose the word that matches the definition) | project | |
csci | Pong | animated video game (e.g. pong) | graphics | project |
csci | Chat | network chat program | networking | project |
csci | Notepad | plain text editor | GUI | project |