Click here for part 1 (creating the fraction class)
In the first part, we created a class that would allow us to create fraction objects and add, subtract, multiply and divde them. Now it’s time to create an application that can actually be used to do these operations. The app will be very simple with no GUI and basic int and string input, but this will allow us to learn some of the basic concepts regarding these two things. Note: if you are coming to this tutorial without going through the first part, I recommend doing that or at least downloading the source code I provided in the last part. Otherwise, without the fraction class, your app won’t build. That being said, let’s begin. (more…)
Click here for part 2 (creating the app)
I’ve been doing some Java programming lately. My latest project was creating an application that adds, subtracts, multiples and divides fractions and reduces them to simplest form. It’s a very basic app, no GUI and simple string and integer input. The first part of this tutorial will involve creating a class for fraction objects while the second part will be building the actual application. Perfect for any beginner programmers and a good tutorial to learn some of the basic fundamentals of Java and object-oriented programming, so let’s begin! (more…)