Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
student_template_BERGOGNE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
BERGOGNE Lou
student_template_BERGOGNE
Commits
4acef41a
Commit
4acef41a
authored
1 year ago
by
Lou
Browse files
Options
Downloads
Patches
Plain Diff
sarting class cohort
parent
147f5b5d
No related branches found
No related tags found
No related merge requests found
Pipeline
#16047
passed
1 year ago
Stage: build
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
bin/main/App.class
+0
-0
0 additions, 0 deletions
bin/main/App.class
bin/main/Cohort.class
+0
-0
0 additions, 0 deletions
bin/main/Cohort.class
src/main/java/App.java
+6
-1
6 additions, 1 deletion
src/main/java/App.java
src/main/java/Cohort.java
+9
-4
9 additions, 4 deletions
src/main/java/Cohort.java
with
15 additions
and
5 deletions
bin/main/App.class
+
0
−
0
View file @
4acef41a
No preview for this file type
This diff is collapsed.
Click to expand it.
bin/main/Cohort.class
+
0
−
0
View file @
4acef41a
No preview for this file type
This diff is collapsed.
Click to expand it.
src/main/java/App.java
+
6
−
1
View file @
4acef41a
public
class
App
{
public
static
void
main
(
String
[]
args
){
// TODO add code
Student
toto
=
new
Student
(
"Toto"
,
"Totoro"
);
Grade
toto_UEpro
=
new
Grade
(
0.0
);
Grade
toto_Sport
=
new
Grade
(
5.0
);
toto
.
addResult
(
"UE_pro"
,
toto_UEpro
);
toto
.
addResult
(
"toto_Sport"
,
toto_Sport
);
toto
.
printResults
();
}
}
This diff is collapsed.
Click to expand it.
src/main/java/Cohort.java
+
9
−
4
View file @
4acef41a
...
...
@@ -24,7 +24,7 @@ public class Cohort {
* @param student the student to be added to the cohort
*/
public
void
addStudent
(
Student
student
){
// TODO : add code
this
.
students
.
add
(
student
);
}
/**
...
...
@@ -32,8 +32,7 @@ public class Cohort {
* @return the list of students of the cohort.
*/
public
List
<
Student
>
getStudents
(){
// TODO : change code
return
null
;
return
this
.
students
;
}
/**
...
...
@@ -50,7 +49,13 @@ public class Cohort {
*/
@Override
public
String
toString
()
{
// TODO : change code
String
textToReturn
=
""
;
System
.
out
.
println
(
this
.
name
+
"\n"
);
for
(
Student
student
:
this
.
students
)
{
System
.
out
.
println
(
"\n"
);
student
.
printResults
();
}
return
null
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment