Much better, always keep your braces consistant, mixing can get confusing, (also normally loses you "style" marks on practicals), also remember to pick a style of if and stick with it:
Method 1:
Code:
if (condition){
statements;
}
Method 2:
Code:
if (condition)
{
statement
}
I prefer Method 2, it takes more space but means if you want to check braces without an IDE its fairly easy.
Final thing would be comments, while nothing is wrong with your current style it does make the code harder to read where I work we always keep to 1tab beyond the longest line in a section of code:
Code:
statement1; // Consistant comment placement
AMuchLongerStatement; // Means that the reader can ignore these
statement2; // and read the code without mixing the two
Section2Statement; // Comments have moved in for second logical section
statement3; // Stil retains much more readability.
//*************** A Section break **************/
// Description of what this bit does, normally used on methods
// Can include descriptions of purpose io variables
//******************************************/
public void randomFunction ()
{
}
Also meaningless comments don't add anything, they can show that you know what you mean however
Code:
public class Lab3
{ //main class
public static void main(String[] args)
{ //beginning of the main method
These comments realistically do not add anything to your comments, your marker will know what these are, to add them makes you look like a bit of a smart ass (commenting, overcommenting are fine however commenting the obvious can lead to markers marking you down because they think you are taking the piss... I have lost marks when we got told to comment because the marker said I was commenting too much, it was a simple calculator, there wasn't anything realistically needing commented).
Final point is variable naming, when using multiple words (you have descriptive names, thats good, too often you see nothing but a, b and d, you should really capitalise or split the words, standardHours,standard_hours or StandardHours is more readable than standardhours and the cost is virtually none in terms of space/effort.
Sorry for lecturing you, both parents are teachers as is my brother and my dad was a programmer for years... programming discussions round the table happen often!