//dont copy this please its close to the right code but it isnt the right code youll have to //figure out whats missing or email me with a question import javax.swing.*;//imports the java swing package which makes the fancy boxes public class fines// this declears the main class which ive chosen to call inputand output you can call it anything you like { public static void main (String[] args)//this is the main method which initialises the string and the arguments to be used { String totalfines;//this is a string i named totalfines you can put in whatever the hell you want int total;//this decleares the integers to be used or "numbers" variables in the program so you can use the words like numbers after you have initialised them JOptionPane.showMessageDialog(null,"THis program will enable you to calculate total fines");//this is just a dialog box that diaplays a message that you can change what you can change is under " " marks //the rest in essential to display the message totalfines = JOptionPane.showInputDialog("Please input the total fines");//this is an input box this box links the String we declared earlier(examresult) to whatever anyone types into the box total = Integer.parseInt(totalfines);//this just changed the string sored values into numbers you can use to calculate with if (total > 5000)//this is a condition statment if the total is equal to five pounds or more you can borrow { JOptionPane.showMessageDialog(null,"YOU CANNOT BORROW"); } if (total < 5000)//this is another condition if the total fines are less than the fiver £5 then you can borrow { JOptionPane.showMessageDialog(null,"YOU CAN BORROW"); } JOptionPane.showMessageDialog(null," THANKYOU COME AGAIN! ");//this is my (apu) simpsons joke System.exit(0);//this exits the system } }