wrain2055
wrain2055
JCHJava Community | Help. Code. Learn.
Created by wrain2055 on 11/20/2024 in #java-help
I am trying to create a simple java project Student Management System
I see thank you now I know appreciate your help guys!
18 replies
JCHJava Community | Help. Code. Learn.
Created by wrain2055 on 11/20/2024 in #java-help
I am trying to create a simple java project Student Management System
I removed the final modifier and removed the bracket at line 13 and moved it at line 45 and all of the errors went away
18 replies
JCHJava Community | Help. Code. Learn.
Created by wrain2055 on 11/20/2024 in #java-help
I am trying to create a simple java project Student Management System
public class Student {
private String name;
private int age;
private int id;

//constructor for Student
public Student (String name, int age, int id){
this.name = name;
this.age = age;
this.id = id;
}



// Getter method to get the student's name
public String getName(){ //getName is a method to get the student's name
return name; //return the student's name
}

//setter method to set the student's name
public void setName (String name ){
this.name = name; //set the new name
}

public int getAge(){
return age; //return the student's age
}

public void setAge (int age ){
this.age = age;
}
public int getId(){
return id;
}
public void setId(int id){
this.id = id;
}

// toString() method for custom object representation
@Override
public String toString() {
return "ID: " + id + ", Name: " + name + ", Age: " + age;
}
}
public class Student {
private String name;
private int age;
private int id;

//constructor for Student
public Student (String name, int age, int id){
this.name = name;
this.age = age;
this.id = id;
}



// Getter method to get the student's name
public String getName(){ //getName is a method to get the student's name
return name; //return the student's name
}

//setter method to set the student's name
public void setName (String name ){
this.name = name; //set the new name
}

public int getAge(){
return age; //return the student's age
}

public void setAge (int age ){
this.age = age;
}
public int getId(){
return id;
}
public void setId(int id){
this.id = id;
}

// toString() method for custom object representation
@Override
public String toString() {
return "ID: " + id + ", Name: " + name + ", Age: " + age;
}
}
18 replies
JCHJava Community | Help. Code. Learn.
Created by wrain2055 on 11/20/2024 in #java-help
I am trying to create a simple java project Student Management System
public class Student {
private final String name;
private final int age;
private final int id;

//constructor for Student
public Student (String name, int age, int id){
this.name = name;
this.age = age;
this.id = id;
}
}


// Getter method to get the student's name
public String getName(){ //getName is a method to get the student's name
return name; //return the student's name
}

//setter method to set the student's name
public void setName (String name ){
this.name = name; //set the new name
}

public int getAge(){
return age;
}

public void setAge (int age ) {
this.age = age;
}
public int getId(){
return id;
}
public void setId(int id){
this.id = id;
}

// toString() method for custom object representation
@Override
public String toString() {
return "ID: " + id + ", Name: " + name + ", Age: " + age;
}
public class Student {
private final String name;
private final int age;
private final int id;

//constructor for Student
public Student (String name, int age, int id){
this.name = name;
this.age = age;
this.id = id;
}
}


// Getter method to get the student's name
public String getName(){ //getName is a method to get the student's name
return name; //return the student's name
}

//setter method to set the student's name
public void setName (String name ){
this.name = name; //set the new name
}

public int getAge(){
return age;
}

public void setAge (int age ) {
this.age = age;
}
public int getId(){
return id;
}
public void setId(int id){
this.id = id;
}

// toString() method for custom object representation
@Override
public String toString() {
return "ID: " + id + ", Name: " + name + ", Age: " + age;
}
18 replies
JCHJava Community | Help. Code. Learn.
Created by wrain2055 on 11/20/2024 in #java-help
I am trying to create a simple java project Student Management System
No description
18 replies