Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
Behnam Va Turkashvand-Jalase 2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9831133
Behnam Va Turkashvand-Jalase 2
Commits
50ae6db6
Commit
50ae6db6
authored
Feb 27, 2020
by
9831133
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
f8ccb9f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
Student.java
Student.java
+39
-0
No files found.
Student.java
0 → 100644
View file @
50ae6db6
public
class
Student
{
private
String
firstName
;
// the student’s last name
private
String
lastName
;
// the student ID
private
String
id
;
//the grade
private
int
grade
;
public
String
getFirstName
()
{
return
firstName
;
}
/**
* @param firstName set first name of a student
*/
public
void
setFirstName
(
String
fName
){
firstName
=
fName
;
}
/**
* Print the student’s last name and ID number to the
output terminal.
*/
public
void
print
()
{
System
.
out
.
println
(
lastName
+
", student ID: "
+
id
+
", grade: "
+
grade
);
}
public
void
setGrade
(
int
grade2
){
grade
=
grade2
;
}
public
int
getGrade
(){
return
grade
;
}
public
Student
(
String
fName
,
String
lname
,
String
sID
){
firstName
=
fName
;
lastName
=
lname
;
id
=
sID
;
grade
=
0
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment