Monday, June 18, 2007
Today is the first day of school reopen and I am being bombarded wus lots and long of scary codes.
Let's take a peek... I doubt anyone will have the mood to study it, and btw it is not the correct one too..hahaz....But at least I am appreciative of my work done..
Imagine the first day in school have to do these coding...and I am totally lost am I in the right course??
public class mainapplication {
public static void main(String args[]){
String grades[] = new String[5];
grades[0] = "4.0";
grades[1] = "3.0";
grades[2] = "2.0";
grades[3] = "1.0";
grades[4] = "0.0";
student thomasObj = new student();
thomasObj.studentname = "Thomas Tan";
thomasObj.gender = 'M';
thomasObj.age = 20;
thomasObj.diploma="Information Technology";
thomasObj.module1="Object Oriented Programming";
thomasObj.module3="Web Multimedia";
thomasObj.module4="Data communication and Networking";
thomasObj.module6="Business Finance";
thomasObj.Grade1="A";
thomasObj.Grade3="B";
thomasObj.Grade4="C";
thomasObj.Grade6="B";
thomasObj.GPA="3";
System.out.println("Student Name: " + thomasObj.studentname);
System.out.println("Gender: " + thomasObj.gender);
System.out.println("Age: " + thomasObj.age);
System.out.println("Diploma: " + thomasObj.diploma);
System.out.println("Modules taken: " + thomasObj.module1 + " " + "Grade: " + thomasObj.Grade1);
System.out.println("Modules taken: " + thomasObj.module3 +" " + "Grade: " + thomasObj.Grade3);
System.out.println("Modules taken: " + thomasObj.module4 +" " + "Grade: " + thomasObj.Grade4);
System.out.println("Modules taken: " + thomasObj.module6 + " " + "Grade: " + thomasObj.Grade6);
System.out.println("GPA: 3");
System.out.println("----------------------------------------------------------------------------");
student LisaObj = new student();
LisaObj.studentname = "Lisa Ang";
LisaObj.gender = 'F';
LisaObj.age = 19;
LisaObj.diploma="Diploma in Business Computing";
LisaObj.module2="Database Systems";
LisaObj.module4="Data communication and Networking";
LisaObj.module5="Marketing";
LisaObj.module6="Business Finance";
LisaObj.Grade2="A";
LisaObj.Grade4="F";
LisaObj.Grade5="B";
LisaObj.Grade6="A";
LisaObj.GPA="2.75";
System.out.println("Student Name: " + LisaObj.studentname);
System.out.println("Gender: " + LisaObj.gender);
System.out.println("Age: " + LisaObj.age);
System.out.println("Diploma: " + LisaObj.diploma);
System.out.println("Modules taken: " + LisaObj.module2 + " " + "Grade: " + LisaObj.Grade2);
System.out.println("Modules taken: " + LisaObj.module4 +" " + "Grade: " + LisaObj.Grade4);
System.out.println("Modules taken: " + LisaObj.module5 +" " + "Grade: " + LisaObj.Grade5);
System.out.println("Modules taken: " + LisaObj.module6 + " " + "Grade: " + LisaObj.Grade6);
System.out.println("GPA: 2.75");
System.out.println("----------------------------------------------------------------------------");
student RosyObj = new student();
RosyObj.studentname = "Rosy Lim";
RosyObj.gender = 'F';
RosyObj.age = 17;
RosyObj.diploma="Diploma in Business ";
RosyObj.module2="Database Systems";
RosyObj.module4="Data communication and Networking";
RosyObj.module5="Marketing";
RosyObj.module6="Business Finance";
RosyObj.Grade2="F";
RosyObj.Grade4="A";
RosyObj.Grade5="D";
RosyObj.Grade6="A";
RosyObj.GPA="2.25";
System.out.println("Student Name: " + RosyObj.studentname);
System.out.println("Gender: " + RosyObj.gender);
System.out.println("Age: " + RosyObj.age);
System.out.println("Diploma: " + RosyObj.diploma);
System.out.println("Modules taken: " + RosyObj.module2 + " " + "Grade: " + RosyObj.Grade2);
System.out.println("Modules taken: " + RosyObj.module4 +" " + "Grade: " + RosyObj.Grade4);
System.out.println("Modules taken: " + RosyObj.module5 +" " + "Grade: " + RosyObj.Grade5);
System.out.println("Modules taken: " + RosyObj.module6 + " " + "Grade: " + RosyObj.Grade6);
System.out.println("GPA: 2.25");
System.out.println("----------------------------------------------------------------------------");
student RobinObj = new student();
RobinObj.studentname = "Robin Lim";
RobinObj.gender = 'M';
RobinObj.age = 21;
RobinObj.diploma="Diploma in Information Technology";
RobinObj.module1="Object Oriented Programming";
RobinObj.module3="Web Multimedia";
RobinObj.module4="Data communication and Networking";
RobinObj.module6="Business Finance";
RobinObj.Grade1="C";
RobinObj.Grade3="D";
RobinObj.Grade4="B";
RobinObj.Grade6="A";
RobinObj.GPA="2.5";
System.out.println("Student Name: " + RobinObj.studentname);
System.out.println("Gender: " + RobinObj.gender);
System.out.println("Age: " + RobinObj.age);
System.out.println("Diploma: " + RobinObj.diploma);
System.out.println("Modules taken: " + RobinObj.module1 + " " + "Grade: " + RobinObj.Grade1);
System.out.println("Modules taken: " + RobinObj.module3 +" " + "Grade: " + RobinObj.Grade3);
System.out.println("Modules taken: " + RobinObj.module4 +" " + "Grade: " + RobinObj.Grade4);
System.out.println("Modules taken: " + RobinObj.module6 + " " + "Grade: " + RobinObj.Grade6);
System.out.println("GPA: 2.5");
System.out.println("----------------------------------------------------------------------------");
student GenesObj = new student();
GenesObj.studentname = "Genes Low";
GenesObj.gender = 'M';
GenesObj.age = 18;
GenesObj.diploma="Diploma in Business Computing";
GenesObj.module2="Database Systems";
GenesObj.module3="Web Multimedia";
GenesObj.module5="Marketing";
GenesObj.module6="Business Finance";
GenesObj.Grade2="B";
GenesObj.Grade3="C";
GenesObj.Grade5="A";
GenesObj.Grade6="A";
GenesObj.GPA="3.25";
System.out.println("Student Name: " + GenesObj.studentname);
System.out.println("Gender: " + GenesObj.gender);
System.out.println("Age: " + GenesObj.age);
System.out.println("Diploma: " + GenesObj.diploma);
System.out.println("Modules taken: " + GenesObj.module2 + " " + "Grade: " + GenesObj.Grade2);
System.out.println("Modules taken: " + GenesObj.module3 +" " + "Grade: " + GenesObj.Grade3);
System.out.println("Modules taken: " + GenesObj.module5 +" " + "Grade: " + GenesObj.Grade5);
System.out.println("Modules taken: " + GenesObj.module6 + " " + "Grade: " + GenesObj.Grade6);
System.out.println("GPA: 3.25");
System.out.println("----------------------------------------------------------------------------");
// highest grade
int highest = 0;
for (int i=0;i<=5;i++)
{
if (thomasObj.grades[i] > highest){
highest = thomasObj.grades[i];
}
System.out.println(highest);
// lowest grade
int lowest = 0;
for (int k=0;k<=9;k++)
{
if (grades[k] < lowest){
lowest = grades[k];
}
System.out.println(lowest);
}
}
}
}
I spent nearly 3 hours typing all these out but to my horrors lots of errors diaoz...
Let's take a peek... I doubt anyone will have the mood to study it, and btw it is not the correct one too..hahaz....But at least I am appreciative of my work done..
Imagine the first day in school have to do these coding...and I am totally lost am I in the right course??
public class mainapplication {
public static void main(String args[]){
String grades[] = new String[5];
grades[0] = "4.0";
grades[1] = "3.0";
grades[2] = "2.0";
grades[3] = "1.0";
grades[4] = "0.0";
student thomasObj = new student();
thomasObj.studentname = "Thomas Tan";
thomasObj.gender = 'M';
thomasObj.age = 20;
thomasObj.diploma="Information Technology";
thomasObj.module1="Object Oriented Programming";
thomasObj.module3="Web Multimedia";
thomasObj.module4="Data communication and Networking";
thomasObj.module6="Business Finance";
thomasObj.Grade1="A";
thomasObj.Grade3="B";
thomasObj.Grade4="C";
thomasObj.Grade6="B";
thomasObj.GPA="3";
System.out.println("Student Name: " + thomasObj.studentname);
System.out.println("Gender: " + thomasObj.gender);
System.out.println("Age: " + thomasObj.age);
System.out.println("Diploma: " + thomasObj.diploma);
System.out.println("Modules taken: " + thomasObj.module1 + " " + "Grade: " + thomasObj.Grade1);
System.out.println("Modules taken: " + thomasObj.module3 +" " + "Grade: " + thomasObj.Grade3);
System.out.println("Modules taken: " + thomasObj.module4 +" " + "Grade: " + thomasObj.Grade4);
System.out.println("Modules taken: " + thomasObj.module6 + " " + "Grade: " + thomasObj.Grade6);
System.out.println("GPA: 3");
System.out.println("----------------------------------------------------------------------------");
student LisaObj = new student();
LisaObj.studentname = "Lisa Ang";
LisaObj.gender = 'F';
LisaObj.age = 19;
LisaObj.diploma="Diploma in Business Computing";
LisaObj.module2="Database Systems";
LisaObj.module4="Data communication and Networking";
LisaObj.module5="Marketing";
LisaObj.module6="Business Finance";
LisaObj.Grade2="A";
LisaObj.Grade4="F";
LisaObj.Grade5="B";
LisaObj.Grade6="A";
LisaObj.GPA="2.75";
System.out.println("Student Name: " + LisaObj.studentname);
System.out.println("Gender: " + LisaObj.gender);
System.out.println("Age: " + LisaObj.age);
System.out.println("Diploma: " + LisaObj.diploma);
System.out.println("Modules taken: " + LisaObj.module2 + " " + "Grade: " + LisaObj.Grade2);
System.out.println("Modules taken: " + LisaObj.module4 +" " + "Grade: " + LisaObj.Grade4);
System.out.println("Modules taken: " + LisaObj.module5 +" " + "Grade: " + LisaObj.Grade5);
System.out.println("Modules taken: " + LisaObj.module6 + " " + "Grade: " + LisaObj.Grade6);
System.out.println("GPA: 2.75");
System.out.println("----------------------------------------------------------------------------");
student RosyObj = new student();
RosyObj.studentname = "Rosy Lim";
RosyObj.gender = 'F';
RosyObj.age = 17;
RosyObj.diploma="Diploma in Business ";
RosyObj.module2="Database Systems";
RosyObj.module4="Data communication and Networking";
RosyObj.module5="Marketing";
RosyObj.module6="Business Finance";
RosyObj.Grade2="F";
RosyObj.Grade4="A";
RosyObj.Grade5="D";
RosyObj.Grade6="A";
RosyObj.GPA="2.25";
System.out.println("Student Name: " + RosyObj.studentname);
System.out.println("Gender: " + RosyObj.gender);
System.out.println("Age: " + RosyObj.age);
System.out.println("Diploma: " + RosyObj.diploma);
System.out.println("Modules taken: " + RosyObj.module2 + " " + "Grade: " + RosyObj.Grade2);
System.out.println("Modules taken: " + RosyObj.module4 +" " + "Grade: " + RosyObj.Grade4);
System.out.println("Modules taken: " + RosyObj.module5 +" " + "Grade: " + RosyObj.Grade5);
System.out.println("Modules taken: " + RosyObj.module6 + " " + "Grade: " + RosyObj.Grade6);
System.out.println("GPA: 2.25");
System.out.println("----------------------------------------------------------------------------");
student RobinObj = new student();
RobinObj.studentname = "Robin Lim";
RobinObj.gender = 'M';
RobinObj.age = 21;
RobinObj.diploma="Diploma in Information Technology";
RobinObj.module1="Object Oriented Programming";
RobinObj.module3="Web Multimedia";
RobinObj.module4="Data communication and Networking";
RobinObj.module6="Business Finance";
RobinObj.Grade1="C";
RobinObj.Grade3="D";
RobinObj.Grade4="B";
RobinObj.Grade6="A";
RobinObj.GPA="2.5";
System.out.println("Student Name: " + RobinObj.studentname);
System.out.println("Gender: " + RobinObj.gender);
System.out.println("Age: " + RobinObj.age);
System.out.println("Diploma: " + RobinObj.diploma);
System.out.println("Modules taken: " + RobinObj.module1 + " " + "Grade: " + RobinObj.Grade1);
System.out.println("Modules taken: " + RobinObj.module3 +" " + "Grade: " + RobinObj.Grade3);
System.out.println("Modules taken: " + RobinObj.module4 +" " + "Grade: " + RobinObj.Grade4);
System.out.println("Modules taken: " + RobinObj.module6 + " " + "Grade: " + RobinObj.Grade6);
System.out.println("GPA: 2.5");
System.out.println("----------------------------------------------------------------------------");
student GenesObj = new student();
GenesObj.studentname = "Genes Low";
GenesObj.gender = 'M';
GenesObj.age = 18;
GenesObj.diploma="Diploma in Business Computing";
GenesObj.module2="Database Systems";
GenesObj.module3="Web Multimedia";
GenesObj.module5="Marketing";
GenesObj.module6="Business Finance";
GenesObj.Grade2="B";
GenesObj.Grade3="C";
GenesObj.Grade5="A";
GenesObj.Grade6="A";
GenesObj.GPA="3.25";
System.out.println("Student Name: " + GenesObj.studentname);
System.out.println("Gender: " + GenesObj.gender);
System.out.println("Age: " + GenesObj.age);
System.out.println("Diploma: " + GenesObj.diploma);
System.out.println("Modules taken: " + GenesObj.module2 + " " + "Grade: " + GenesObj.Grade2);
System.out.println("Modules taken: " + GenesObj.module3 +" " + "Grade: " + GenesObj.Grade3);
System.out.println("Modules taken: " + GenesObj.module5 +" " + "Grade: " + GenesObj.Grade5);
System.out.println("Modules taken: " + GenesObj.module6 + " " + "Grade: " + GenesObj.Grade6);
System.out.println("GPA: 3.25");
System.out.println("----------------------------------------------------------------------------");
// highest grade
int highest = 0;
for (int i=0;i<=5;i++)
{
if (thomasObj.grades[i] > highest){
highest = thomasObj.grades[i];
}
System.out.println(highest);
// lowest grade
int lowest = 0;
for (int k=0;k<=9;k++)
{
if (grades[k] < lowest){
lowest = grades[k];
}
System.out.println(lowest);
}
}
}
}
I spent nearly 3 hours typing all these out but to my horrors lots of errors diaoz...
3:18 pm