Java

The following presents some small, but nevertheless helpful tools. They can be programmed with basic and partially with advanced knowledge. Not only the implementation is presented, but also the logical structure. It must always be thought through.

Photo script

Static images, i.e. slide shows, are a thing of the past.

Today, photos should inform and have interesting functionality.

With a little JavaScript, you can do a lot. For example, you can create image areas, so-called slices, that change their appearance when the mouse is touched.

In the example, the banks of the Main were photographed with their surroundings. If you move the mouse over the left edge of the image, 3 more image sections (slices) appear. In this way, you can improve the otherwise slightly bland appearance. The viewer’s curiosity is aroused by giving them “Advent calendar” doors to open. Problem: They have to know that there are hidden things to discover.

Calculator program

Calculating is fun.

A small calculator the size of a business card is certainly always useful. From time to time you want to solve smaller tasks quickly. These could be grade averages, for example. Higher scientific operations such as trigonometric functions, roots or logarithms are less important.

Although Windows offers an internal calculator, a calculator created to your own specifications is much more efficient. Especially if it is accessible worldwide via the Internet. The prerequisites for this are an internet connection and a current Java plug-in. The calculations can begin.

The plug-in is a prerequisite for functionality. You can download it for free from Java Sun.

In order to program a well-thought-out calculator, which applies to all good programs, the concept must be created beforehand.

For this program, the author looked at various calculators. It is known from math exams that control over what happens on the calculator is not just a student’s wish, but a requirement. The student must know exactly what the operations are in order to be able to correct any errors quickly. For these reasons, the two-operator model was chosen for Java.

A good calculator is characterized by its memory function. This was also taken into account. The function is similar to a conventional device.

The further operation, which follows the so-called Polish notation, can be found in the user manual. The Polish notation has some advantages and disadvantages compared to the normal one. For scientific calculations, the advantages seem to outweigh the disadvantages.

Temperature conversion program

Kelvin versus Fahrenheit How often have you had to deal with temperatures in Fahrenheit? American cookbooks use this unit almost exclusively. Equating Fahrenheit with degrees Celsius is a fatal mistake.

You can find the simple conversion formulas in the relevant literature. Unfortunately, this process wastes valuable time and it is easy to make mistakes. A Java applet that converts temperatures is completely different. With the push of a button, the problem is solved. You can concentrate on what is important: cooking!

Surely just one example among many where you should convert units - a necessity for scientific calculations!

 
© 2005-2024 Christian Drischler