Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teacher #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/homework-java-ironschool.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

91 changes: 91 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions com/ironhack/homework2/src/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.ironhack.homework2.src;

public class Main {
public static void main(String[] args) {

}
}
39 changes: 39 additions & 0 deletions com/ironhack/homework2/src/Teacher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import java.util.UUID;

public class Teacher {
private String teacherId;
private String name;
private double salary;

// Parameterized constructor
public Teacher(String name, double salary) {
this.teacherId = UUID.randomUUID().toString(); // Generate random UUID for teacherId
this.name = name;
this.salary = salary;
}

// Getter for teacherId
public String getTeacherId() {
return teacherId;
}

// Getter for name
public String getName() {
return name;
}

// Setter for name
public void setName(String name) {
this.name = name;
}

// Getter for salary
public double getSalary() {
return salary;
}

// Setter for salary
public void setSalary(double salary) {
this.salary = salary;
}
}