Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
68dd4eb
se agregan las practicas 6.1 y 6.2
rosariocruz Jul 7, 2018
9bf7d33
Merge pull request #4 from breakponchito/rosarioofbranch
breakponchito Jul 7, 2018
668aa9e
Se suben practicas
Jason-FG Jul 12, 2018
6cd4dda
se agrega la practica 7.1 y se cambia el nombre del paquete de la pra…
rosariocruz Jul 13, 2018
b26ecd3
se cambia el paquete de todas las clases de la practica 6.2
rosariocruz Jul 13, 2018
c04ecd8
Merge pull request #7 from breakponchito/rosariobranch
breakponchito Jul 13, 2018
71bdf44
Se suben correcion de los directorios y ejercicios
Jul 13, 2018
2d6b3d0
Merge pull request #8 from breakponchito/sofflixbranch
breakponchito Jul 14, 2018
ae97f36
Se modifican comentarios de las clases de la practica 6.2 y se agrega…
rosariocruz Jul 14, 2018
035ab8c
Merge branch 'master' into rosariobranch
rosariocruz Jul 14, 2018
9c29127
agregar version del source code
rosariocruz Jul 14, 2018
86f6de0
Agregando practica 6.1
Andres-NC Jul 14, 2018
ea7c1c7
Agregando clase Player
Andres-NC Jul 14, 2018
20412ec
se agregan las practicas 9.1 y 9.2
rosariocruz Jul 17, 2018
e7fc81b
Merge pull request #9 from breakponchito/rosariobranch
breakponchito Jul 18, 2018
15ca639
Merge pull request #12 from breakponchito/andres
breakponchito Jul 18, 2018
a754c6e
Merge pull request #13 from breakponchito/JasonIran
breakponchito Jul 18, 2018
2f29a96
Merge pull request #14 from breakponchito/rosariobrach
breakponchito Jul 18, 2018
6f5d4cc
practicas corregidas del 1 al 10
jgaonap Jul 25, 2018
6df0705
se agregan ejercicios del 3 al 7
rosariocruz Jul 25, 2018
4724ee3
Merge pull request #16 from breakponchito/pbranch
breakponchito Jul 27, 2018
799b739
Merge pull request #18 from breakponchito/rosariobranch
breakponchito Jul 27, 2018
12db1c6
se agregan practicas de la 10 a la 14
rosariocruz Jul 27, 2018
c74117c
Merge pull request #20 from breakponchito/rosariobranch
breakponchito Jul 27, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@
<properties>
<java.src.version>1.8</java.src.version>
<javac.target.version>1.8</javac.target.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 andresnc.practices.practice_06_objectsclasses_1.soccer;

/**
*
* @author andres
*/
public class Game {
public Team homeTeam;
public Team awayTeam;
public Goal[] goals;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 andresnc.practices.practice_06_objectsclasses_1.soccer;

/**
*
* @author andres
*/
public class Goal {
public Team theTeam;
public Player thePLayer;
public double theTime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* 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 andresnc.practices.practice_06_objectsclasses_1.soccer;

/**
*
* @author andres
*/
public class League {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Player player1 = new Player();
player1.playerName = "George Eliot";

Player player2 = new Player();
player2.playerName = "Graham Greene";

Player player3 = new Player();
player3.playerName = "Geoffrey Chaucer";

Player [] thePlayers = {player1,player2,player3};

Team team1 = new Team();
team1.teamName = "The Greens";

team1.playerArray = thePlayers;

for (Player thePlayer: team1.playerArray) {
System.out.println(thePlayer.playerName);
}

Team team2 = new Team();
team2.teamName = "The reds";

team2.playerArray = new Player[3];

team2.playerArray[0] = new Player();
team2.playerArray[0].playerName = "Robert Service";

team2.playerArray[1] = new Player();
team2.playerArray[1].playerName = "Robbie Burns";

team2.playerArray[2] = new Player();
team2.playerArray[2].playerName = "Rafael Sabatini";

for (Player thePlayer: team2.playerArray) {
System.out.println(thePlayer.playerName);
}

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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 andresnc.practices.practice_06_objectsclasses_1.soccer;

/**
*
* @author andres
*/
public class Player {
public String playerName;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* 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 andresnc.practices.practice_06_objectsclasses_1.soccer;

/**
*
* @author andres
*/
public class Team {
public String teamName;
public Player[] playerArray;
}
10 changes: 0 additions & 10 deletions src/main/java/jasgz/Main.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

package jasgz.practices.practice_06_objectsclasses_1.soccer;

public class Game {
public Team homeTeam;
public Team awayTeam;
public Goal[] goals;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package jasgz.practices.practice_06_objectsclasses_1.soccer;

public class Goal {
public Team theTeam;
public Player thePlayer;
public double theTime;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package jasgz.practices.practice_06_objectsclasses_1.soccer;

public class League {

public static void main(String []args){
Player player1= new Player();
player1.playerName="George Eliot";//PLAYER OF THE TEAM ONE "THE GREENS"

Player player2= new Player();
player2.playerName="Graham Greene";//PLAYER OF THE TEAM ONE "THE GREENS"

Player player3= new Player();
player3.playerName="Geoffrey Chaucer";//PLAYER OF THE TEAM ONE "THE GREENS"

Player[]thePlayers={player1, player2, player3};

Team team1= new Team();//TEAM ONE
team1.teamName="The Greens";
team1.playerArray= thePlayers;

Team team2=new Team();//TEAM TWO
team2.teamName="The Reds";
team2.playerArray= new Player[3];
team2.playerArray[0]=new Player();
team2.playerArray[0].playerName="Robert Service";//PLAYER OF THE TEAM "THE REDS"
team2.playerArray[1]= new Player();
team2.playerArray[1].playerName="Robbie Burns";//PLAYER OF THE TEAM "THE REDS"
team2.playerArray[2]= new Player();
team2.playerArray[2].playerName="Rafael Sabatini";//PLAYER OF THE TEAM "THE REDS"

player1.playerName="Robert Service";//REMOVING PLAYER WITH THE NAME "GEORGE ELIOT"
for(Player thePlayer: team1.playerArray){
System.out.println(thePlayer.playerName);
}
for(Player thePlayer: team2.playerArray){
System.out.println(thePlayer.playerName);

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package jasgz.practices.practice_06_objectsclasses_1.soccer;

public class Player {
public String playerName;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package jasgz.practices.practice_06_objectsclasses_1.soccer;

public class Team {
public String teamName;
public Player[] playerArray;




}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package jasgz.practices.practice_06_objectsclasses_2.soccer;

public class Game {
public Team homeTeam;
public Team awayTeam;
public Goal[] goals;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package jasgz.practices.practice_06_objectsclasses_2.soccer;

public class Goal {
public Team theTeam;
public Player thePlayer;
public double theTime;

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package jasgz.practices.practice_06_objectsclasses_2.soccer;

public class League {

public static void main(String[] args) {
Game currGame = new Game();

Player player1 = new Player();
player1.playerName = "George Eliot";//PLAYER OF THE TEAM ONE "THE GREENS"

Player player2 = new Player();
player2.playerName = "Graham Greene";//PLAYER OF THE TEAM ONE "THE GREENS"

Player player3 = new Player();
player3.playerName = "Geoffrey Chaucer";//PLAYER OF THE TEAM ONE "THE GREENS"

Player[] thePlayers = {player1, player2, player3};

Team team1 = new Team();//TEAM ONE
team1.teamName = "The Greens";
team1.playerArray = thePlayers;

Team team2 = new Team();//TEAM TWO
team2.teamName = "The Reds";
team2.playerArray = new Player[3];
team2.playerArray[0] = new Player();
team2.playerArray[0].playerName = "Robert Service";//PLAYER OF THE TEAM "THE REDS"
team2.playerArray[1] = new Player();
team2.playerArray[1].playerName = "Robbie Burns";//PLAYER OF THE TEAM "THE REDS"
team2.playerArray[2] = new Player();
team2.playerArray[2].playerName = "Rafael Sabatini";//PLAYER OF THE TEAM "THE REDS"


player1.playerName = "Robert Service";//REMOVING PLAYER WITH THE NAME "GEORGE ELIOT"

currGame.homeTeam = team1;
currGame.awayTeam = team2;

Goal goal1 = new Goal();
goal1.thePlayer = currGame.homeTeam.playerArray[2];
goal1.theTeam = currGame.homeTeam;
goal1.theTime = 55;

Goal[] theGoals = {goal1};
currGame.goals = theGoals;

System.out.println("Goal scored after " + currGame.goals[0].theTime +
" mins by " + currGame.goals[0].thePlayer.playerName +
" of " + currGame.goals[0].theTeam.teamName);



}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package jasgz.practices.practice_06_objectsclasses_2.soccer;

public class Player {
public String playerName;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package jasgz.practices.practice_06_objectsclasses_2.soccer;

public class Team {
public String teamName;
public Player[] playerArray;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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 jorgeantonio.exercises.ex03_1_exercise;

/**
*
* @author Hp
*/
public class ShoppingCart {
public static void main (String[] args){
System.out.println("Este es mi mensaje");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* 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 jorgeantonio.exercises.ex04_1_exercise;

/**
*
* @author Hp
*/
public class ShoppingCart {
public static void main(String[] args) {
// Declare and initialize String variables. Do not initialize message yet.
String custName = "Jorge ", itemDesc = "loves the music";
String message;


// Assign the message variable
message = custName + itemDesc;

// Print and run the code

System.out.println(message);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* 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 jorgeantonio.exercises.ex04_2_exercise;

/**
*
* @author Hp
*/
public class ShoppingCart {
public static void main(String[] args) {
String custName = "Jorge";
String itemDesc = "Discs";
String message = custName+" bought "+itemDesc;
double price = 52.0 , tax = 5.2;
int quantity = 2;
double total;
// Declare and initialize numeric fields: price, tax, quantity, and total.


// Modify message to include quantity
message = custName + " bought " + quantity + " " + itemDesc;

System.out.println(message);

total = price * quantity * tax;


// Calculate total and then print the total cost

System.out.println("and they cost " + total);

}
}
Loading