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
f148fbaf
Commit
f148fbaf
authored
Mar 07, 2020
by
9831133
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Student.java
parent
a4ba78a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
Student.java
Student.java
+15
-6
No files found.
Student.java
View file @
f148fbaf
public
class
Student
{
private
String
firstName
;
// the student’s
la
st name
// the student’s
fir
st name
private
String
lastName
;
// the student
ID
// the student
last name
private
String
id
;
//the
grade
//the
id
private
int
grade
;
// the grade
public
String
getFirstName
()
{
return
firstName
;
}
...
...
@@ -16,24 +17,32 @@ public class Student {
firstName
=
fName
;
}
/**
* Print the student’s last name and ID number to the
output terminal.
*/
* 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
);
}
// Prints the student's information
public
void
setGrade
(
int
grade2
){
grade
=
grade2
;
}
// This function sets the grade
public
int
getGrade
(){
return
grade
;
}
// This function gets tne grade
public
Student
(
String
fName
,
String
lname
,
String
sID
){
firstName
=
fName
;
lastName
=
lname
;
id
=
sID
;
grade
=
0
;
}
/**
* @param fName first name of student
* @param lname last name of student
* @param sID student ID
*/
}
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