diff --git a/.besouro/20161006143126290/actions.txt b/.besouro/20161006143126290/actions.txt new file mode 100644 index 0000000..bf1fb58 --- /dev/null +++ b/.besouro/20161006143126290/actions.txt @@ -0,0 +1,115 @@ +FileOpenedAction 1475753486599 Spreadsheet.java 264 3 2 0 +RefactoringAction 1475753561287 Cell.java ADD Cell.java CLASS +FileOpenedAction 1475753561425 Cell.java 28 0 0 0 +RefactoringAction 1475753582508 Cell.java ADD String cell FIELD +RefactoringAction 1475753590552 Cell.java ADD String v FIELD +RefactoringAction 1475753593063 Cell.java RENAME v=>String value FIELD +RefactoringAction 1475753614630 Cell.java ADD String getValue FIELD +RefactoringAction 1475753617647 Cell.java RENAME getValue=>String getValue() METHOD +RefactoringAction 1475753632709 Cell.java RENAME getValue()=>String getValue(String) METHOD +RefactoringAction 1475753640743 Cell.java RENAME getValue(String)=>String getValue() METHOD +RefactoringAction 1475753708248 Spreadsheet.java ADD Object getCell() METHOD +RefactoringAction 1475753779383 Spreadsheet.java ADD List Spre FIELD +RefactoringAction 1475753781410 Spreadsheet.java RENAME Spre=>List Spread FIELD +RefactoringAction 1475753782932 Spreadsheet.java RENAME Spread=>List Spreadsheet FIELD +RefactoringAction 1475753804526 Spreadsheet.java REMOVE Spreadsheet FIELD +RefactoringAction 1475753913581 Cell.java RENAME cell=>String name FIELD +RefactoringAction 1475753965624 Spreadsheet.java ADD List Spread FIELD +RefactoringAction 1475753973142 Spreadsheet.java RENAME Spread=>List Spreadsheet FIELD +RefactoringAction 1475754079281 Spreadsheet.java REMOVE Spreadsheet FIELD +RefactoringAction 1475754092817 Spreadsheet.java ADD Cell FIELD +RefactoringAction 1475754096335 Spreadsheet.java RENAME Sprea=>Cell FIELD +RefactoringAction 1475754200161 SpreadsheetTest.java ADD void GetCell FIELD +RefactoringAction 1475754202175 SpreadsheetTest.java RENAME GetCell=>void GetCellValue FIELD +RefactoringAction 1475754206718 SpreadsheetTest.java RENAME GetCellValue=>void GetCellValue8 FIELD +RefactoringAction 1475754208233 SpreadsheetTest.java RENAME GetCellValue8=>void GetCellValue() METHOD +EditAction 1475754300743 Spreadsheet.java 351 4 3 0 +CompilationAction 1475754302535 Spreadsheet.java +EditAction 1475754302593 SpreadsheetTest.java 285 2 4 1 +EditAction 1475754304288 Cell.java 127 1 1 0 +UnitTestCaseAction 1475754306313 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475754306314 SpreadsheetTest.java FAIL +EditAction 1475754328894 SpreadsheetTest.java 287 2 4 1 +UnitTestCaseAction 1475754330516 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475754330517 SpreadsheetTest.java FAIL +RefactoringAction 1475754412192 SpreadsheetTest.java ADD void SetCellValue FIELD +RefactoringAction 1475754413708 SpreadsheetTest.java RENAME SetCellValue=>void SetCellValue() METHOD +RefactoringAction 1475754434320 SpreadsheetTest.java ADD Cell Cell FIELD +RefactoringAction 1475754497755 Cell.java ADD void setValue(String) METHOD +EditAction 1475754526818 SpreadsheetTest.java 390 3 5 2 +CompilationAction 1475754528803 SpreadsheetTest.java +EditAction 1475754528868 Cell.java 199 2 2 0 +UnitTestCaseAction 1475754531050 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475754531051 SpreadsheetTest.java FAIL +RefactoringAction 1475754550233 SpreadsheetTest.java ADD void New FIELD +RefactoringAction 1475754551748 SpreadsheetTest.java RENAME New=>void NewCell FIELD +RefactoringAction 1475754553763 SpreadsheetTest.java RENAME NewCell=>void NewCell() METHOD +RefactoringAction 1475754644460 SpreadsheetTest.java ADD Spreadsheet Spreadsheet FIELD +EditAction 1475754740004 SpreadsheetTest.java 551 4 7 3 +UnitTestCaseAction 1475754742686 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475754742687 SpreadsheetTest.java FAIL +RefactoringAction 1475754784774 Cell.java ADD void ne FIELD +RefactoringAction 1475754786287 Cell.java RENAME ne=>void newCell FIELD +RefactoringAction 1475754788300 Cell.java RENAME newCell=>void newCell() METHOD +RefactoringAction 1475754792320 Cell.java RENAME newCell()=>void newCell FIELD +RefactoringAction 1475754793332 Cell.java RENAME newCell=>void newCell() METHOD +RefactoringAction 1475754807871 Cell.java RENAME newCell()=>void newCell(String) METHOD +RefactoringAction 1475754810881 Cell.java RENAME newCell(String)=>void newCell(String, String) METHOD +RefactoringAction 1475755044498 Cell.java RENAME newCell(String, String)=>Cell(String, String) METHOD +RefactoringAction 1475755102839 Spreadsheet.java ADD Spreadsheet(String, String) METHOD +RefactoringAction 1475755263059 Spreadsheet.java REMOVE Spreadsheet(String, String) METHOD +RefactoringAction 1475755322743 Spreadsheet.java ADD import java.lang.reflect.Array IMPORT +RefactoringAction 1475755335682 Spreadsheet.java REMOVE Spreadsheet FIELD +RefactoringAction 1475755364696 Spreadsheet.java ADD List Spreadsheet FIELD +RefactoringAction 1475755436405 Spreadsheet.java ADD import java.util.ArrayList IMPORT +RefactoringAction 1475755440974 Spreadsheet.java ADD import java.util.List IMPORT +RefactoringAction 1475755490824 Spreadsheet.java RENAME Spreadsheet=>Spreadsheet() METHOD +RefactoringAction 1475755548402 Spreadsheet.java ADD import Cell IMPORT +RefactoringAction 1475755563420 Spreadsheet.java REMOVE import Cell IMPORT +RefactoringAction 1475755652485 Spreadsheet.java ADD List Spreadsheet FIELD +RefactoringAction 1475755843838 Spreadsheet.java RENAME getCell()=>int index FIELD +RefactoringAction 1475755845857 Spreadsheet.java REMOVE index FIELD +EditAction 1475755909629 Spreadsheet.java 545 4 5 0 +CompilationAction 1475755911709 Spreadsheet.java +CompilationAction 1475755911710 Spreadsheet.java +EditAction 1475755911751 Cell.java 261 3 2 0 +CompilationAction 1475755913799 SpreadsheetTest.java +UnitTestCaseAction 1475755916384 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475755916385 SpreadsheetTest.java FAIL +RefactoringAction 1475755930139 Cell.java ADD Cell() METHOD +EditAction 1475755942680 Cell.java 282 4 2 0 +UnitTestCaseAction 1475755944895 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475755944896 SpreadsheetTest.java FAIL +EditAction 1475756112351 Spreadsheet.java 541 4 5 0 +UnitTestCaseAction 1475756114742 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475756114744 SpreadsheetTest.java FAIL +EditAction 1475756149962 Spreadsheet.java 536 4 5 0 +UnitTestCaseAction 1475756152345 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475756152346 SpreadsheetTest.java FAIL +RefactoringAction 1475756527233 Cell.java ADD String getName FIELD +RefactoringAction 1475756528745 Cell.java RENAME getName=>String getName() METHOD +EditAction 1475756737368 Spreadsheet.java 618 4 7 0 +CompilationAction 1475756739337 Spreadsheet.java +EditAction 1475756739387 SpreadsheetTest.java 557 4 7 3 +EditAction 1475756741143 Cell.java 320 5 3 0 +UnitTestCaseAction 1475756742921 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475756742922 SpreadsheetTest.java FAIL +RefactoringAction 1475756881189 Spreadsheet.java REMOVE Spreadsheet() METHOD +UnitTestCaseAction 1475756886871 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475756886872 SpreadsheetTest.java FAIL +EditAction 1475757120520 Spreadsheet.java 547 3 6 0 +UnitTestCaseAction 1475757124080 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475757124081 SpreadsheetTest.java FAIL +RefactoringAction 1475757300842 Cell.java RENAME Cell(String, String)=>Cell(String) METHOD +RefactoringAction 1475757302852 Cell.java REMOVE name FIELD +RefactoringAction 1475757305362 Cell.java REMOVE getName() METHOD +RefactoringAction 1475757365407 Cell.java RENAME Cell(String)=>String name FIELD +RefactoringAction 1475758391859 SpreadsheetTest.java ADD void SetCellName() METHOD +RefactoringAction 1475758470073 Cell.java ADD void set FIELD +RefactoringAction 1475758474584 Cell.java RENAME set=>void setName FIELD +RefactoringAction 1475758478095 Cell.java RENAME setName=>void setName(String) METHOD +EditAction 1475758529647 Spreadsheet.java 547 3 6 0 +EditAction 1475758531710 SpreadsheetTest.java 648 5 9 4 +EditAction 1475758533731 Cell.java 373 5 5 0 +UnitTestCaseAction 1475758536229 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475758536230 SpreadsheetTest.java FAIL diff --git a/.besouro/20161006143126290/besouroEpisodes.txt b/.besouro/20161006143126290/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006143126290/disagreements.txt b/.besouro/20161006143126290/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006143126290/randomHeuristicEpisodes.txt b/.besouro/20161006143126290/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006143126290/userComments.txt b/.besouro/20161006143126290/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006143126290/zorroEpisodes.txt b/.besouro/20161006143126290/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006155705116/actions.txt b/.besouro/20161006155705116/actions.txt new file mode 100644 index 0000000..770cf93 --- /dev/null +++ b/.besouro/20161006155705116/actions.txt @@ -0,0 +1,34 @@ +FileOpenedAction 1475758625332 SpreadsheetTest.java 619 5 8 4 +EditAction 1475758663153 SpreadsheetTest.java 648 5 9 4 +UnitTestCaseAction 1475758667052 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475758667055 SpreadsheetTest.java FAIL +FileOpenedAction 1475758678964 Spreadsheet.java 547 3 6 0 +RefactoringAction 1475759528049 SpreadsheetTest.java ADD void GetCell FIELD +RefactoringAction 1475759531075 SpreadsheetTest.java RENAME GetCell=>void GetCellValue FIELD +RefactoringAction 1475759533099 SpreadsheetTest.java RENAME GetCellValue=>void GetCellValue_ FIELD +RefactoringAction 1475759534620 SpreadsheetTest.java RENAME GetCellValue_=>void GetCellValue_INT FIELD +RefactoringAction 1475759535647 SpreadsheetTest.java RENAME GetCellValue_INT=>void GetCellValue_INT() METHOD +EditAction 1475759575219 SpreadsheetTest.java 749 6 11 5 +UnitTestCaseAction 1475759577530 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475759577531 SpreadsheetTest.java FAIL +EditAction 1475760534654 Spreadsheet.java 547 3 6 0 +EditAction 1475760537538 Cell.java 446 5 5 0 +CompilationAction 1475760539675 Cell.java +UnitTestCaseAction 1475760545107 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475760545108 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475760786374 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475760786375 SpreadsheetTest.java FAIL +RefactoringAction 1475761764728 Cell.java ADD void isNaN() METHOD +RefactoringAction 1475761766744 Cell.java REMOVE isNaN() METHOD +EditAction 1475762182258 Cell.java 471 5 5 0 +CompilationAction 1475762184385 Cell.java +UnitTestCaseAction 1475762187162 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475762187163 SpreadsheetTest.java FAIL +UnitTestCaseAction 1475762198862 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475762198863 SpreadsheetTest.java FAIL +EditAction 1475762220081 SpreadsheetTest.java 743 6 11 5 +UnitTestCaseAction 1475762222409 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475762222410 SpreadsheetTest.java FAIL +EditAction 1475762240048 SpreadsheetTest.java 745 6 11 5 +UnitTestCaseAction 1475762242373 SpreadsheetTest.java FAIL +UnitTestSessionAction 1475762242374 SpreadsheetTest.java FAIL diff --git a/.besouro/20161006155705116/besouroEpisodes.txt b/.besouro/20161006155705116/besouroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006155705116/disagreements.txt b/.besouro/20161006155705116/disagreements.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006155705116/randomHeuristicEpisodes.txt b/.besouro/20161006155705116/randomHeuristicEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006155705116/userComments.txt b/.besouro/20161006155705116/userComments.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161006155705116/zorroEpisodes.txt b/.besouro/20161006155705116/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161013143135184/actions.txt b/.besouro/20161013143135184/actions.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161013143135184/zorroEpisodes.txt b/.besouro/20161013143135184/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2016101314315470/actions.txt b/.besouro/2016101314315470/actions.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/2016101314315470/zorroEpisodes.txt b/.besouro/2016101314315470/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161013143212846/actions.txt b/.besouro/20161013143212846/actions.txt new file mode 100644 index 0000000..e69de29 diff --git a/.besouro/20161013143212846/zorroEpisodes.txt b/.besouro/20161013143212846/zorroEpisodes.txt new file mode 100644 index 0000000..e69de29 diff --git a/bin/Cell.class b/bin/Cell.class new file mode 100644 index 0000000..81b6c5c Binary files /dev/null and b/bin/Cell.class differ diff --git a/bin/Spreadsheet.class b/bin/Spreadsheet.class index 92b411f..388eb6c 100644 Binary files a/bin/Spreadsheet.class and b/bin/Spreadsheet.class differ diff --git a/bin/SpreadsheetTest.class b/bin/SpreadsheetTest.class index e7086bd..92cb25b 100644 Binary files a/bin/SpreadsheetTest.class and b/bin/SpreadsheetTest.class differ diff --git a/src/Cell.java b/src/Cell.java new file mode 100644 index 0000000..96808d4 --- /dev/null +++ b/src/Cell.java @@ -0,0 +1,32 @@ + +public class Cell { + public String name; + public String value; + + + public String getValue(){ + return value; + } + + + + + + public void setValue(String value) { + + this.value=value; + + } + + public void setName(String name){ + this.name=name; + } + + + public Cell(String name, String value){ + this.value=value; + this.name=name; + } + public Cell(){} + +} diff --git a/src/Spreadsheet.java b/src/Spreadsheet.java index e4f120b..493d608 100644 --- a/src/Spreadsheet.java +++ b/src/Spreadsheet.java @@ -1,18 +1,65 @@ +import java.lang.reflect.Array; +import java.util.ArrayList; +import java.util.List; + public class Spreadsheet { + + + List Spreadsheet= new ArrayList<>(); + + public Cell get(String cell) { + int i = 0; + int index=-1; + for (i=0;i