Skip to content

Commit

Permalink
enhancement(lint): Fix lint errors for projects/Instantiating Objects…
Browse files Browse the repository at this point in the history
… Lab/StudentFactory.java

Co-authored-by: NeonGamerBot-QK <[email protected]>
Signed-off-by: zeon-neon[bot] <136533918+zeon-neon[bot]@users.noreply.github.com>
  • Loading branch information
zeon-neon[bot] and NeonGamerBot-QK authored Oct 8, 2024
1 parent b3fed7f commit 76ffe5b
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions projects/Instantiating Objects Lab/StudentFactory.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
public class StudentFactory
{
public static void main(String[] args)
{
// instantiate a few Student objects and call methods on them
Student me = new Student("Saahil", 10);
int myGrade = me.getGrade();
System.out.println("My name is " + me.getName() + " and I am in grade " + myGrade);
me.nextGrade();
myGrade = me.getGrade();
System.out.println("My name is " + me.getName() + " and I am in grade " + myGrade);
}
}
public class StudentFactory {

public static void main(String[] args) {
// instantiate a few Student objects and call methods on them
Student me = new Student("Saahil", 10);
int myGrade = me.getGrade();
System.out.println(
"My name is " + me.getName() + " and I am in grade " + myGrade
);
me.nextGrade();
myGrade = me.getGrade();
System.out.println(
"My name is " + me.getName() + " and I am in grade " + myGrade
);
}
}

0 comments on commit 76ffe5b

Please sign in to comment.