HighLow java Game

his program lets the user play HighLow, a simple card game that is described in the output statements at the beginning of the main() routine. After the user plays several games, the user’s average score is reported. Java...

Mouse Events Information Applet

A simple applet that displays information about mouse events as they occur. Since double-buffering is not used, the display flickers quite a bit. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This...

Download Upload Statistics Manager

This program is for those who have a fixed limit for downloading/uploading. It creates and saves the statistics of the numerical value passed by the user. Before use the user needs to create 2 text files every month. One named : stats<monthnumber>.txt and...

Java applet – HighLow Game

This applet is a simple card game. The user sees a card and tries to predict whether the next card will be higher or lower. Aces are the lowest-valued cards. If the user makes three correct predictions, the user wins. If not, the user loses. This version of the game...

Process Binary Trees – Java

This program demonstrates a few routines for processing binary sort trees. It uses a binary sort tree of strings. The user types in strings. The user’s string is converted to lower case, and — if it is not already in the tree — it is inserted into...

Simulation of console-I/O program BirthdayProblemDemo

Simulation of console-I/O program BirthdayProblemDemo, using ConsoleApplet as a basis. See the file ConsoleApplet.java for more information. David Eck eck@hws.edu Java /******************************************************* * MYCPLUS...

Keyboard Animation Applet – Java

The KeyboardAnimation2 applet provides a generic framework for applets both display an animation and respond to keyboard events. The animation runs only when the applet has the keyboard focus and can respond to key presses. The appearance of the applet changes,...

Stop-Watch Java Program

A component that acts as a simple stop-watch. When the user clicks on it, this componet starts timing. When the user clicks again, it displays the time between the two clicks. Clicking a third time starts another timer, etc. While it is timing, the label just displays...

BirthdayProblem Demonstration

How many random people do you have to select before you find a duplicate birthday (that is, two peole who were born on the same day of the same month, but not necessarily in the same year). This program simulates the process. (It ignores the possibility of people born...

Laout managers applet demo

This applet demonstrates various layout managers. The applet itself uses a border layout with a JPanel in the center, a JComboBox menu to the North, and a JLabel to the south. The center panel uses a CardLayout. Each card in the card layout contains a number of...

Count the words in a file – Java

This program will read words from an input file, and count the number of occurrences of each word. The word data is written to an output file twice, once with the words in alphabetical order and once with the words ordered by number of occurrences. The input and...

Blackjack Java Game

In this applet, the user plays a game of Blackjack. The computer acts as the dealer. The user plays by clicking “Hit!” and “Stand!” buttons. The programming of this applet assumes that the applet is set up to be about 466 pixels wide and about...

Moving ball applet – Java

An object of type MovingBall holds data about a “ball” that has a color, radius, position, speed, and direction. The ball is restricted to moving around inside a rectangle in the xy-plane. The ball can draw itself in a graphics context and will move when...

Towers of Hanio Java Applet

This applet solves the Towers of Hanoi problem for a tower of 10 disks. (Ten differntly-sized disks are stacked in a pile, in order of decreasing size. There are two other places for piles. The object is to move the pile to the second available place, subject to the...

Applet demonstrates recursion

This applet demonstrates recursion by counting the number of squares in a “blob”. The squares are arranged in a grid, and each position in the grid can be either empty or filled. A blob is defined to be a filled square and any square that can be reached...

GUI example

Example of a gui with different features. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of...

Different Borders Applet

A simple applet that shows labels with six different types of border. Java /******************************************************* * MYCPLUS Sample Code - https://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided...

Console Based Java Calculator

This is a small Console Based Java Calculator that can add, subtract , divide and multiply two numbers. Find the square root of a number, cube of a number, nth Power of a number. It is very for the begnners of Java. Java...

SystemErrorOwnsYou

SystemErrorOwnsYou— This is a tool I created to put your freinds or enemies under Denial of service conditions- Dont worry… this tool will not have any long lasting effect, in-fact once you re-boot you computer it will be in the exact same state as it was...

An applet for two-way chatting

This applet supports two-way chatting between users. It implements a client for the ConnectionBroker server, which can set up a relayed connection between a pair of such clients. There are really two functions: The user can register with the server as a client who is...