Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Groupe3-TicTacToe
Project
Project
Details
Activity
Releases
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
BAHRMAN Louis
Groupe3-TicTacToe
Commits
f159fbc2
Commit
f159fbc2
authored
Apr 20, 2020
by
Louis Bahrman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout de Fraction.java
a
parent
44acde4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
Fraction.java
src/tictactoecodingame/Fraction.java
+57
-0
No files found.
src/tictactoecodingame/Fraction.java
0 → 100644
View file @
f159fbc2
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package
tictactoecodingame
;
/**
*
* @author louis
*/
public
class
Fraction
{
int
num
;
int
den
;
public
Fraction
(
int
n
,
int
d
){
num
=
n
;
den
=
d
;
}
public
Fraction
(){
num
=
0
;
den
=
0
;
}
public
Fraction
(
int
n
){
num
=
n
;
den
=
1
;
}
public
int
getScore
(){
return
num
;
}
public
double
getNote
(){
try
{
return
num
/
den
;
}
catch
(
ArithmeticException
e
){
return
1
.;}
}
public
int
getNumerateur
(){
return
num
;
}
public
int
getDenominateur
(){
return
den
;}
public
void
setDenominateur
(
int
d
){
den
=
d
;}
public
void
setNumerateur
(
int
n
){
num
=
n
;
}
public
void
incrementeNumerateur
(){
num
+=
1
;}
public
void
incrementeDenominateur
(){
den
+=
1
;}
}
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