GUI – Refinements – Error Messages

This entry is part 11 of 13 in the series Zellers Algorithm

The next refinement is simple. I want the output box to change colour, when the output of the calculation contains the word ‘Error’. How I have decided to handle this is by creating a new String before sending setting it as the content of the JTextField element. I have also decided to add a few … Read more

GUI – Refinements – ComboBoxes

This entry is part 10 of 13 in the series Zellers Algorithm

The first refinement i wish to make is to make the inputs for Day and Month to be ComboBoxes. In order to do this I first need to create two arrays containing all the values for the days(0 – 31) and months(“—” to “December”). The arrays will both store these values as strings and then … Read more

Java GUI

This entry is part 9 of 13 in the series Zellers Algorithm

The Final step is to create the GUI, I have sketched out my plan by hand. My initial plan is on the left, I plan to have 3 text input boxes, a large calculate button and an output box. The window will not be too big and I will fix the width and height, so … Read more

validDate Revisited – Java

This entry is part 8 of 13 in the series Zellers Algorithm

With the updated Python function, comes an updated Java function, the code now looks like this, similar to the Python function there are two new checks and a final check that daysInMonth is not still zero: With this function working correctly, I can now continue with developing the GUI.

validDate Revisited – Python

This entry is part 7 of 13 in the series Zellers Algorithm

I have just realised a mistake in my validDate Function. The mistake is that it only validates the day and not the month or year, i also realised that it would validate the day even if the day is zero so I need to fix this. It was only when I was creating the Java … Read more

Zeller Java

This entry is part 6 of 13 in the series Zellers Algorithm

The next evolution of this project is to eventually create a graphical user interface(GUI). This is possible to do using Python. But, I want to use Java for this job so recreating the work I have already done in Java is the way to go. So what’s first. The first thing is to write the … Read more

Valid Date

This entry is part 5 of 13 in the series Zellers Algorithm

Another good function which would come in handy for Zeller is a function to make sure the date which was inputted is valid and display a message if the program has encountered an invalid date. For this function I will be using my inArray function which I wrote in a previous post. I will utilise … Read more

In Array

This entry is part 4 of 13 in the series Zellers Algorithm

Something I am constantly wanting to do in a lot of programs is see if a value is in an array. For another function which I wish to write to add to the Zeller program this will come in handy. The basic algorithm looks like this: SET value TO RequiredValueSET array TO ArrayToSearchSET isIn TO … Read more

Factoral and Recursion

We all remember factorals from school but to remind us what they are, a factoral is the product of all the positive integers less than or equal to the initial number(n): For example: Strangely 0!=1 there is a mathematical proof which states why but I will not be expanding on it here, I will however … Read more

Getting There

Over the last few weeks I have been sorting out this website with a category structure which is below: For each category I have created a featured image: I have found this quite satisfying and since we are in lock down it has given me something to focus on. I have also come up with … Read more