SlideShare a Scribd company logo
Team:
public class Team {
private String teamId;
private String name;
private String firstName;
private String lastName;
private String phoneNumber;
private String emailAddress;
Team(String teamId, String name, String firstName, String lastName, String phoneNumber,
String emailAddress) {
this.teamId = teamId;
this.name = name;
this.firstName = firstName;
this.lastName = lastName;
this.phoneNumber = phoneNumber;
this.emailAddress = emailAddress;
}
public String getTeamId() {
return teamId;
}
public void setTeamId(String teamId) {
this.teamId = teamId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public static boolean checkEmailAddress(String emailAddress) {
return emailAddress.contains("@");
}
@Override
public String toString() {
return "Team [teamId=" + teamId + ", name=" + name + ", firstName=" + firstName +
", lastName=" + lastName
+ ", phoneNumber=" + phoneNumber + ", emailAddress=" + emailAddress + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
result = prime * result + ((teamId == null) ? 0 : teamId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Team other = (Team) obj;
if (emailAddress == null) {
if (other.emailAddress != null)
return false;
} else if (!emailAddress.equals(other.emailAddress))
return false;
if (firstName == null) {
if (other.firstName != null)
return false;
} else if (!firstName.equals(other.firstName))
return false;
if (lastName == null) {
if (other.lastName != null)
return false;
} else if (!lastName.equals(other.lastName))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (phoneNumber == null) {
if (other.phoneNumber != null)
return false;
} else if (!phoneNumber.equals(other.phoneNumber))
return false;
if (teamId == null) {
if (other.teamId != null)
return false;
} else if (!teamId.equals(other.teamId))
return false;
return true;
}
}
Game:
public class Game {
private int gameId;
private String houseTeamId;
private String guestTeamId;
private int dateOfGame;
private int homeTeamScore;
private int guestTeamScore;
Game(int gameId, String houseTeamId, String guestTeamId, int dateOfGame, int
houseTeamScore, int guestTeamScore) {
this.gameId = gameId;
this.houseTeamId = houseTeamId;
this.guestTeamId = guestTeamId;
this.dateOfGame = dateOfGame;
this.homeTeamScore = houseTeamScore;
this.guestTeamScore = guestTeamScore;
}
public int getGameId() {
return gameId;
}
public void setGameId(int gameId) {
this.gameId = gameId;
}
public String getHouseTeamId() {
return houseTeamId;
}
public void setHouseTeamId(String houseTeamId) {
this.houseTeamId = houseTeamId;
}
public String getGuestTeamId() {
return guestTeamId;
}
public void setGuestTeamId(String guestTeamId) {
this.guestTeamId = guestTeamId;
}
public int getDateOfGame() {
return dateOfGame;
}
public void setDateOfGame(int dateOfGame) {
this.dateOfGame = dateOfGame;
}
public int getHomeTeamScore() {
return homeTeamScore;
}
public void setHomeTeamScore(int homeTeamScore) {
this.homeTeamScore = homeTeamScore;
}
public int getGuestTeamScore() {
return guestTeamScore;
}
public void setGuestTeamScore(int guestTeamScore) {
this.guestTeamScore = guestTeamScore;
}
public static boolean checkGameDate(int gameDate) {
return gameDate >= 20160101 && gameDate <= 20160531;
}
@Override
public String toString() {
return "Game [gameId=" + gameId + ", houseTeamId=" + houseTeamId + ",
guestTeamId=" + guestTeamId
+ ", dateOfGame=" + dateOfGame + ", homeTeamScore=" + homeTeamScore + ",
guestTeamScore="
+ guestTeamScore + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + dateOfGame;
result = prime * result + gameId;
result = prime * result + ((guestTeamId == null) ? 0 : guestTeamId.hashCode());
result = prime * result + guestTeamScore;
result = prime * result + homeTeamScore;
result = prime * result + ((houseTeamId == null) ? 0 : houseTeamId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Game other = (Game) obj;
if (dateOfGame != other.dateOfGame)
return false;
if (gameId != other.gameId)
return false;
if (guestTeamId == null) {
if (other.guestTeamId != null)
return false;
} else if (!guestTeamId.equals(other.guestTeamId))
return false;
if (guestTeamScore != other.guestTeamScore)
return false;
if (homeTeamScore != other.homeTeamScore)
return false;
if (houseTeamId == null) {
if (other.houseTeamId != null)
return false;
} else if (!houseTeamId.equals(other.houseTeamId))
return false;
return true;
}
}
Test:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class Test {
public static void main(String[] args) {
final String INPUT_FILENAME = "hw1input.txt";
System.out.println("Running Test 1a");
Team test1a = new Team("test1aTeamId", "test1aTeamName",
"test1aTeamFirstName", "test1aTeamLastName",
"test1aTeamPhoneNumber", "test1a@TeamEmailAddress.com");
System.out.println(test1a.toString());
System.out.println("Running Test 1b");
Game game1b = new Game(1, "test1bteamId", "guest1bteamId", 20160412, 5, 2);
System.out.println(game1b.toString());
Team test2a = null;
Game game2b = null;
try {
InputStream file = new FileInputStream(new File(INPUT_FILENAME));
BufferedReader stream = new BufferedReader(new InputStreamReader(file));
String line = null;
while ((line = stream.readLine()) != null) {
String[] dataFromFile = line.split(",");
if (dataFromFile[0].equalsIgnoreCase("TEAM")) {
System.out.println("Running Test 2a");
test2a = setTeamAttribute(dataFromFile);
getTeamAttribute(test2a);
} else {
System.out.println("Running Test 2b");
game2b = setGameAttribute(dataFromFile);
getGameAttribute(game2b);
}
}
stream.close();
file.close();
} catch (FileNotFoundException e) {
System.err.println("File Not Found");
} catch (IOException e) {
System.err.println("Could not read the File");
}
System.out.println("Running Test 3a");
if (test1a.equals(test2a))
System.out.println("Team objects are equal");
else
System.out.println("Team objects are not equal");
System.out.println("Running Test 3b");
if (game1b.equals(game2b))
System.out.println("Game objects are equal");
else
System.out.println("Game objects are not equal");
}
public static void getGameAttribute(Game game) {
System.out.println(game.getGameId());
System.out.println(game.getHouseTeamId());
System.out.println(game.getGuestTeamId());
System.out.println(game.getHomeTeamScore());
System.out.println(game.getGuestTeamScore());
System.out.println(game.getDateOfGame());
}
public static Game setGameAttribute(String[] dataFromFile) {
Game game = null;
if (!Game.checkGameDate(Integer.parseInt(dataFromFile[4])))
System.err.println("Invalid game date: " + dataFromFile[4]);
else {
game = new Game(Integer.parseInt(dataFromFile[1]), dataFromFile[2], dataFromFile[3],
Integer.parseInt(dataFromFile[4]), Integer.parseInt(dataFromFile[5]),
Integer.parseInt(dataFromFile[6]));
}
return game;
}
public static void getTeamAttribute(Team team) {
System.out.println(team.getTeamId());
System.out.println(team.getName());
System.out.println(team.getFirstName());
System.out.println(team.getLastName());
System.out.println(team.getPhoneNumber());
System.out.println(team.getEmailAddress());
}
public static Team setTeamAttribute(String[] dataFromFile) {
Team team = null;
if (!Team.checkEmailAddress(dataFromFile[6]))
System.err.println("Invalide e-mail address is missing (at sign)" + dataFromFile[6]);
else {
team = new Team(dataFromFile[1], dataFromFile[2], dataFromFile[3], dataFromFile[4],
dataFromFile[5],
dataFromFile[6]);
}
return team;
}
}
Solution
Team:
public class Team {
private String teamId;
private String name;
private String firstName;
private String lastName;
private String phoneNumber;
private String emailAddress;
Team(String teamId, String name, String firstName, String lastName, String phoneNumber,
String emailAddress) {
this.teamId = teamId;
this.name = name;
this.firstName = firstName;
this.lastName = lastName;
this.phoneNumber = phoneNumber;
this.emailAddress = emailAddress;
}
public String getTeamId() {
return teamId;
}
public void setTeamId(String teamId) {
this.teamId = teamId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getPhoneNumber() {
return phoneNumber;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
public String getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
public static boolean checkEmailAddress(String emailAddress) {
return emailAddress.contains("@");
}
@Override
public String toString() {
return "Team [teamId=" + teamId + ", name=" + name + ", firstName=" + firstName +
", lastName=" + lastName
+ ", phoneNumber=" + phoneNumber + ", emailAddress=" + emailAddress + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
result = prime * result + ((teamId == null) ? 0 : teamId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Team other = (Team) obj;
if (emailAddress == null) {
if (other.emailAddress != null)
return false;
} else if (!emailAddress.equals(other.emailAddress))
return false;
if (firstName == null) {
if (other.firstName != null)
return false;
} else if (!firstName.equals(other.firstName))
return false;
if (lastName == null) {
if (other.lastName != null)
return false;
} else if (!lastName.equals(other.lastName))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (phoneNumber == null) {
if (other.phoneNumber != null)
return false;
} else if (!phoneNumber.equals(other.phoneNumber))
return false;
if (teamId == null) {
if (other.teamId != null)
return false;
} else if (!teamId.equals(other.teamId))
return false;
return true;
}
}
Game:
public class Game {
private int gameId;
private String houseTeamId;
private String guestTeamId;
private int dateOfGame;
private int homeTeamScore;
private int guestTeamScore;
Game(int gameId, String houseTeamId, String guestTeamId, int dateOfGame, int
houseTeamScore, int guestTeamScore) {
this.gameId = gameId;
this.houseTeamId = houseTeamId;
this.guestTeamId = guestTeamId;
this.dateOfGame = dateOfGame;
this.homeTeamScore = houseTeamScore;
this.guestTeamScore = guestTeamScore;
}
public int getGameId() {
return gameId;
}
public void setGameId(int gameId) {
this.gameId = gameId;
}
public String getHouseTeamId() {
return houseTeamId;
}
public void setHouseTeamId(String houseTeamId) {
this.houseTeamId = houseTeamId;
}
public String getGuestTeamId() {
return guestTeamId;
}
public void setGuestTeamId(String guestTeamId) {
this.guestTeamId = guestTeamId;
}
public int getDateOfGame() {
return dateOfGame;
}
public void setDateOfGame(int dateOfGame) {
this.dateOfGame = dateOfGame;
}
public int getHomeTeamScore() {
return homeTeamScore;
}
public void setHomeTeamScore(int homeTeamScore) {
this.homeTeamScore = homeTeamScore;
}
public int getGuestTeamScore() {
return guestTeamScore;
}
public void setGuestTeamScore(int guestTeamScore) {
this.guestTeamScore = guestTeamScore;
}
public static boolean checkGameDate(int gameDate) {
return gameDate >= 20160101 && gameDate <= 20160531;
}
@Override
public String toString() {
return "Game [gameId=" + gameId + ", houseTeamId=" + houseTeamId + ",
guestTeamId=" + guestTeamId
+ ", dateOfGame=" + dateOfGame + ", homeTeamScore=" + homeTeamScore + ",
guestTeamScore="
+ guestTeamScore + "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + dateOfGame;
result = prime * result + gameId;
result = prime * result + ((guestTeamId == null) ? 0 : guestTeamId.hashCode());
result = prime * result + guestTeamScore;
result = prime * result + homeTeamScore;
result = prime * result + ((houseTeamId == null) ? 0 : houseTeamId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Game other = (Game) obj;
if (dateOfGame != other.dateOfGame)
return false;
if (gameId != other.gameId)
return false;
if (guestTeamId == null) {
if (other.guestTeamId != null)
return false;
} else if (!guestTeamId.equals(other.guestTeamId))
return false;
if (guestTeamScore != other.guestTeamScore)
return false;
if (homeTeamScore != other.homeTeamScore)
return false;
if (houseTeamId == null) {
if (other.houseTeamId != null)
return false;
} else if (!houseTeamId.equals(other.houseTeamId))
return false;
return true;
}
}
Test:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
public class Test {
public static void main(String[] args) {
final String INPUT_FILENAME = "hw1input.txt";
System.out.println("Running Test 1a");
Team test1a = new Team("test1aTeamId", "test1aTeamName",
"test1aTeamFirstName", "test1aTeamLastName",
"test1aTeamPhoneNumber", "test1a@TeamEmailAddress.com");
System.out.println(test1a.toString());
System.out.println("Running Test 1b");
Game game1b = new Game(1, "test1bteamId", "guest1bteamId", 20160412, 5, 2);
System.out.println(game1b.toString());
Team test2a = null;
Game game2b = null;
try {
InputStream file = new FileInputStream(new File(INPUT_FILENAME));
BufferedReader stream = new BufferedReader(new InputStreamReader(file));
String line = null;
while ((line = stream.readLine()) != null) {
String[] dataFromFile = line.split(",");
if (dataFromFile[0].equalsIgnoreCase("TEAM")) {
System.out.println("Running Test 2a");
test2a = setTeamAttribute(dataFromFile);
getTeamAttribute(test2a);
} else {
System.out.println("Running Test 2b");
game2b = setGameAttribute(dataFromFile);
getGameAttribute(game2b);
}
}
stream.close();
file.close();
} catch (FileNotFoundException e) {
System.err.println("File Not Found");
} catch (IOException e) {
System.err.println("Could not read the File");
}
System.out.println("Running Test 3a");
if (test1a.equals(test2a))
System.out.println("Team objects are equal");
else
System.out.println("Team objects are not equal");
System.out.println("Running Test 3b");
if (game1b.equals(game2b))
System.out.println("Game objects are equal");
else
System.out.println("Game objects are not equal");
}
public static void getGameAttribute(Game game) {
System.out.println(game.getGameId());
System.out.println(game.getHouseTeamId());
System.out.println(game.getGuestTeamId());
System.out.println(game.getHomeTeamScore());
System.out.println(game.getGuestTeamScore());
System.out.println(game.getDateOfGame());
}
public static Game setGameAttribute(String[] dataFromFile) {
Game game = null;
if (!Game.checkGameDate(Integer.parseInt(dataFromFile[4])))
System.err.println("Invalid game date: " + dataFromFile[4]);
else {
game = new Game(Integer.parseInt(dataFromFile[1]), dataFromFile[2], dataFromFile[3],
Integer.parseInt(dataFromFile[4]), Integer.parseInt(dataFromFile[5]),
Integer.parseInt(dataFromFile[6]));
}
return game;
}
public static void getTeamAttribute(Team team) {
System.out.println(team.getTeamId());
System.out.println(team.getName());
System.out.println(team.getFirstName());
System.out.println(team.getLastName());
System.out.println(team.getPhoneNumber());
System.out.println(team.getEmailAddress());
}
public static Team setTeamAttribute(String[] dataFromFile) {
Team team = null;
if (!Team.checkEmailAddress(dataFromFile[6]))
System.err.println("Invalide e-mail address is missing (at sign)" + dataFromFile[6]);
else {
team = new Team(dataFromFile[1], dataFromFile[2], dataFromFile[3], dataFromFile[4],
dataFromFile[5],
dataFromFile[6]);
}
return team;
}
}

More Related Content

Similar to Team public class Team {    private String teamId;    priva.pdf

OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
akkhan101
 
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
Педагошко друштво информатичара Србије
 
There is something wrong with my program-- (once I do a for view all t.pdf
There is something wrong with my program-- (once I do a for view all t.pdfThere is something wrong with my program-- (once I do a for view all t.pdf
There is something wrong with my program-- (once I do a for view all t.pdf
aashienterprisesuk
 
@author public class Person{   String sname, .pdf
  @author   public class Person{   String sname, .pdf  @author   public class Person{   String sname, .pdf
@author public class Person{   String sname, .pdf
aplolomedicalstoremr
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdf
aniyathikitchen
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
arjuncorner565
 
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdfLECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
ShashikantSathe3
 
AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokusHamletDRC
 
Rewrite this code so it can use a generic type instead of integers. .pdf
Rewrite this code so it can use a generic type instead of integers. .pdfRewrite this code so it can use a generic type instead of integers. .pdf
Rewrite this code so it can use a generic type instead of integers. .pdf
alphaagenciesindia
 
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdfimport java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
shaktisinhgandhinaga
 
Write a class (BasketballTeam) encapsulating the concept of a tea.pdf
Write a class (BasketballTeam) encapsulating the concept of a tea.pdfWrite a class (BasketballTeam) encapsulating the concept of a tea.pdf
Write a class (BasketballTeam) encapsulating the concept of a tea.pdf
rozakashif85
 
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
.NET Conf UY
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
asif1401
 
public class Person { private String name; private int age;.pdf
public class Person { private String name; private int age;.pdfpublic class Person { private String name; private int age;.pdf
public class Person { private String name; private int age;.pdf
arjuncp10
 
Symfony2 - extending the console component
Symfony2 - extending the console componentSymfony2 - extending the console component
Symfony2 - extending the console component
Hugo Hamon
 
Getting the following errorsError 1 error C2436 {ctor} mem.pdf
Getting the following errorsError 1 error C2436 {ctor}  mem.pdfGetting the following errorsError 1 error C2436 {ctor}  mem.pdf
Getting the following errorsError 1 error C2436 {ctor} mem.pdf
herminaherman
 
I have the following code and I need to know why I am receiving the .pdf
I have the following code and I need to know why I am receiving the .pdfI have the following code and I need to know why I am receiving the .pdf
I have the following code and I need to know why I am receiving the .pdf
ezzi552
 
Modify the project so tat records are inserted into the random acess.pdf
Modify the project so tat records are inserted into the random acess.pdfModify the project so tat records are inserted into the random acess.pdf
Modify the project so tat records are inserted into the random acess.pdf
fcaindore
 
多治見IT勉強会 Groovy Grails
多治見IT勉強会 Groovy Grails多治見IT勉強会 Groovy Grails
多治見IT勉強会 Groovy Grails
Tsuyoshi Yamamoto
 

Similar to Team public class Team {    private String teamId;    priva.pdf (20)

OrderTest.javapublic class OrderTest {       Get an arra.pdf
OrderTest.javapublic class OrderTest {         Get an arra.pdfOrderTest.javapublic class OrderTest {         Get an arra.pdf
OrderTest.javapublic class OrderTest {       Get an arra.pdf
 
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
FNT 2015 PDIS CodeEU - Zanimljiva informatika - 02 Djordje Pavlovic - Live_ch...
 
There is something wrong with my program-- (once I do a for view all t.pdf
There is something wrong with my program-- (once I do a for view all t.pdfThere is something wrong with my program-- (once I do a for view all t.pdf
There is something wrong with my program-- (once I do a for view all t.pdf
 
@author public class Person{   String sname, .pdf
  @author   public class Person{   String sname, .pdf  @author   public class Person{   String sname, .pdf
@author public class Person{   String sname, .pdf
 
MineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdfMineSweeper.java public class MS { public static void main(Strin.pdf
MineSweeper.java public class MS { public static void main(Strin.pdf
 
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdfModify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
Modify HuffmanTree.java and HuffmanNode.java to allow the user to se.pdf
 
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdfLECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
LECTURE 2 MORE TYPES, METHODS, CONDITIONALS.pdf
 
AST Transformations at JFokus
AST Transformations at JFokusAST Transformations at JFokus
AST Transformations at JFokus
 
Rewrite this code so it can use a generic type instead of integers. .pdf
Rewrite this code so it can use a generic type instead of integers. .pdfRewrite this code so it can use a generic type instead of integers. .pdf
Rewrite this code so it can use a generic type instead of integers. .pdf
 
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdfimport java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
import java.util.Scanner;class BinaryNode{     BinaryNode left.pdf
 
Write a class (BasketballTeam) encapsulating the concept of a tea.pdf
Write a class (BasketballTeam) encapsulating the concept of a tea.pdfWrite a class (BasketballTeam) encapsulating the concept of a tea.pdf
Write a class (BasketballTeam) encapsulating the concept of a tea.pdf
 
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
Code Smells y Refactoring o haciendo que nuestro codigo huela (y se vea) mejo...
 
Java Puzzlers
Java PuzzlersJava Puzzlers
Java Puzzlers
 
The main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdfThe main class of the tictoe game looks like.public class Main {.pdf
The main class of the tictoe game looks like.public class Main {.pdf
 
public class Person { private String name; private int age;.pdf
public class Person { private String name; private int age;.pdfpublic class Person { private String name; private int age;.pdf
public class Person { private String name; private int age;.pdf
 
Symfony2 - extending the console component
Symfony2 - extending the console componentSymfony2 - extending the console component
Symfony2 - extending the console component
 
Getting the following errorsError 1 error C2436 {ctor} mem.pdf
Getting the following errorsError 1 error C2436 {ctor}  mem.pdfGetting the following errorsError 1 error C2436 {ctor}  mem.pdf
Getting the following errorsError 1 error C2436 {ctor} mem.pdf
 
I have the following code and I need to know why I am receiving the .pdf
I have the following code and I need to know why I am receiving the .pdfI have the following code and I need to know why I am receiving the .pdf
I have the following code and I need to know why I am receiving the .pdf
 
Modify the project so tat records are inserted into the random acess.pdf
Modify the project so tat records are inserted into the random acess.pdfModify the project so tat records are inserted into the random acess.pdf
Modify the project so tat records are inserted into the random acess.pdf
 
多治見IT勉強会 Groovy Grails
多治見IT勉強会 Groovy Grails多治見IT勉強会 Groovy Grails
多治見IT勉強会 Groovy Grails
 

More from DEEPAKSONI562

S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
DEEPAKSONI562
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdf
DEEPAKSONI562
 
The answer is b, theres no increase in H. .pdf
                     The answer is b, theres no increase in H.        .pdf                     The answer is b, theres no increase in H.        .pdf
The answer is b, theres no increase in H. .pdf
DEEPAKSONI562
 
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
DEEPAKSONI562
 
Natural rubber is a polymer of isoprene units ; e.pdf
                     Natural rubber is a polymer of isoprene units ; e.pdf                     Natural rubber is a polymer of isoprene units ; e.pdf
Natural rubber is a polymer of isoprene units ; e.pdf
DEEPAKSONI562
 
no double displacement reactions can be mixing tw.pdf
                     no double displacement reactions can be mixing tw.pdf                     no double displacement reactions can be mixing tw.pdf
no double displacement reactions can be mixing tw.pdf
DEEPAKSONI562
 
using System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdfusing System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdf
DEEPAKSONI562
 
Toxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdfToxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdf
DEEPAKSONI562
 
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdftime is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
DEEPAKSONI562
 
This is the code for the above 5 public class Input extends JFram.pdf
This is the code for the above 5 public class Input extends JFram.pdfThis is the code for the above 5 public class Input extends JFram.pdf
This is the code for the above 5 public class Input extends JFram.pdf
DEEPAKSONI562
 
PollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdfPollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdf
DEEPAKSONI562
 
Patient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdfPatient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdf
DEEPAKSONI562
 
Non financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdfNon financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdf
DEEPAKSONI562
 
C) III is correct note the configuration keep un.pdf
                     C) III is correct note the configuration keep un.pdf                     C) III is correct note the configuration keep un.pdf
C) III is correct note the configuration keep un.pdf
DEEPAKSONI562
 
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdfLHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
DEEPAKSONI562
 
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdfimport com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
DEEPAKSONI562
 
intervalSolutioninterval.pdf
intervalSolutioninterval.pdfintervalSolutioninterval.pdf
intervalSolutioninterval.pdf
DEEPAKSONI562
 
In2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdfIn2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdf
DEEPAKSONI562
 
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdfFeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
DEEPAKSONI562
 
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdfD the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
DEEPAKSONI562
 

More from DEEPAKSONI562 (20)

S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
S = {0,1,2,3,4,5} P(S) be the set of all nonempty subsets of.pdf
 
The java program that prompts user to enter a string and .pdf
  The java program that prompts user to  enter a string and .pdf  The java program that prompts user to  enter a string and .pdf
The java program that prompts user to enter a string and .pdf
 
The answer is b, theres no increase in H. .pdf
                     The answer is b, theres no increase in H.        .pdf                     The answer is b, theres no increase in H.        .pdf
The answer is b, theres no increase in H. .pdf
 
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf                     Step1 white ppt with NaCl(aq) indicates Ag+  Step.pdf
Step1 white ppt with NaCl(aq) indicates Ag+ Step.pdf
 
Natural rubber is a polymer of isoprene units ; e.pdf
                     Natural rubber is a polymer of isoprene units ; e.pdf                     Natural rubber is a polymer of isoprene units ; e.pdf
Natural rubber is a polymer of isoprene units ; e.pdf
 
no double displacement reactions can be mixing tw.pdf
                     no double displacement reactions can be mixing tw.pdf                     no double displacement reactions can be mixing tw.pdf
no double displacement reactions can be mixing tw.pdf
 
using System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdfusing System; using System.Collections.Generic; using System.Lin.pdf
using System; using System.Collections.Generic; using System.Lin.pdf
 
Toxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdfToxicants may move across biological membranes by all the following .pdf
Toxicants may move across biological membranes by all the following .pdf
 
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdftime is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
time is 18.2yearsdetailed answer i will submit nowSolutionti.pdf
 
This is the code for the above 5 public class Input extends JFram.pdf
This is the code for the above 5 public class Input extends JFram.pdfThis is the code for the above 5 public class Input extends JFram.pdf
This is the code for the above 5 public class Input extends JFram.pdf
 
PollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdfPollinationFertilization1.     Pollination is the transfer of po.pdf
PollinationFertilization1.     Pollination is the transfer of po.pdf
 
Patient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdfPatient.java package A9.toStudents; public class Patient imple.pdf
Patient.java package A9.toStudents; public class Patient imple.pdf
 
Non financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdfNon financial performance indicators of United Utilities Group PLC. .pdf
Non financial performance indicators of United Utilities Group PLC. .pdf
 
C) III is correct note the configuration keep un.pdf
                     C) III is correct note the configuration keep un.pdf                     C) III is correct note the configuration keep un.pdf
C) III is correct note the configuration keep un.pdf
 
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdfLHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
LHS =2y+1RHS=-(-2y-1)         =2y+1LHS =RHSy=all the real nu.pdf
 
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdfimport com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
import com.rogue.roguer.command.CommandHandler; import com.rogue.r.pdf
 
intervalSolutioninterval.pdf
intervalSolutioninterval.pdfintervalSolutioninterval.pdf
intervalSolutioninterval.pdf
 
In2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdfIn2O3SolutionIn2O3.pdf
In2O3SolutionIn2O3.pdf
 
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdfFeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
FeCO3 is an ionic compound, composed of the Fe(II)2+ ion and the CO3.pdf
 
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdfD the polar covalent bond within methanol cannot form hydrogen bond .pdf
D the polar covalent bond within methanol cannot form hydrogen bond .pdf
 

Recently uploaded

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 

Recently uploaded (20)

Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Team public class Team {    private String teamId;    priva.pdf

  • 1. Team: public class Team { private String teamId; private String name; private String firstName; private String lastName; private String phoneNumber; private String emailAddress; Team(String teamId, String name, String firstName, String lastName, String phoneNumber, String emailAddress) { this.teamId = teamId; this.name = name; this.firstName = firstName; this.lastName = lastName; this.phoneNumber = phoneNumber; this.emailAddress = emailAddress; } public String getTeamId() { return teamId; } public void setTeamId(String teamId) { this.teamId = teamId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName;
  • 2. } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; } public static boolean checkEmailAddress(String emailAddress) { return emailAddress.contains("@"); } @Override public String toString() { return "Team [teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ", lastName=" + lastName + ", phoneNumber=" + phoneNumber + ", emailAddress=" + emailAddress + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((emailAddress == null) ? 0 : emailAddress.hashCode()); result = prime * result + ((firstName == null) ? 0 : firstName.hashCode()); result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
  • 3. result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode()); result = prime * result + ((teamId == null) ? 0 : teamId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Team other = (Team) obj; if (emailAddress == null) { if (other.emailAddress != null) return false; } else if (!emailAddress.equals(other.emailAddress)) return false; if (firstName == null) { if (other.firstName != null) return false; } else if (!firstName.equals(other.firstName)) return false; if (lastName == null) { if (other.lastName != null) return false; } else if (!lastName.equals(other.lastName)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (phoneNumber == null) { if (other.phoneNumber != null)
  • 4. return false; } else if (!phoneNumber.equals(other.phoneNumber)) return false; if (teamId == null) { if (other.teamId != null) return false; } else if (!teamId.equals(other.teamId)) return false; return true; } } Game: public class Game { private int gameId; private String houseTeamId; private String guestTeamId; private int dateOfGame; private int homeTeamScore; private int guestTeamScore; Game(int gameId, String houseTeamId, String guestTeamId, int dateOfGame, int houseTeamScore, int guestTeamScore) { this.gameId = gameId; this.houseTeamId = houseTeamId; this.guestTeamId = guestTeamId; this.dateOfGame = dateOfGame; this.homeTeamScore = houseTeamScore; this.guestTeamScore = guestTeamScore; } public int getGameId() { return gameId; } public void setGameId(int gameId) { this.gameId = gameId; } public String getHouseTeamId() {
  • 5. return houseTeamId; } public void setHouseTeamId(String houseTeamId) { this.houseTeamId = houseTeamId; } public String getGuestTeamId() { return guestTeamId; } public void setGuestTeamId(String guestTeamId) { this.guestTeamId = guestTeamId; } public int getDateOfGame() { return dateOfGame; } public void setDateOfGame(int dateOfGame) { this.dateOfGame = dateOfGame; } public int getHomeTeamScore() { return homeTeamScore; } public void setHomeTeamScore(int homeTeamScore) { this.homeTeamScore = homeTeamScore; } public int getGuestTeamScore() { return guestTeamScore; } public void setGuestTeamScore(int guestTeamScore) { this.guestTeamScore = guestTeamScore; } public static boolean checkGameDate(int gameDate) { return gameDate >= 20160101 && gameDate <= 20160531; } @Override public String toString() { return "Game [gameId=" + gameId + ", houseTeamId=" + houseTeamId + ", guestTeamId=" + guestTeamId
  • 6. + ", dateOfGame=" + dateOfGame + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore=" + guestTeamScore + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + dateOfGame; result = prime * result + gameId; result = prime * result + ((guestTeamId == null) ? 0 : guestTeamId.hashCode()); result = prime * result + guestTeamScore; result = prime * result + homeTeamScore; result = prime * result + ((houseTeamId == null) ? 0 : houseTeamId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Game other = (Game) obj; if (dateOfGame != other.dateOfGame) return false; if (gameId != other.gameId) return false; if (guestTeamId == null) { if (other.guestTeamId != null) return false; } else if (!guestTeamId.equals(other.guestTeamId)) return false; if (guestTeamScore != other.guestTeamScore) return false;
  • 7. if (homeTeamScore != other.homeTeamScore) return false; if (houseTeamId == null) { if (other.houseTeamId != null) return false; } else if (!houseTeamId.equals(other.houseTeamId)) return false; return true; } } Test: import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class Test { public static void main(String[] args) { final String INPUT_FILENAME = "hw1input.txt"; System.out.println("Running Test 1a"); Team test1a = new Team("test1aTeamId", "test1aTeamName", "test1aTeamFirstName", "test1aTeamLastName", "test1aTeamPhoneNumber", "test1a@TeamEmailAddress.com"); System.out.println(test1a.toString()); System.out.println("Running Test 1b"); Game game1b = new Game(1, "test1bteamId", "guest1bteamId", 20160412, 5, 2); System.out.println(game1b.toString()); Team test2a = null; Game game2b = null; try { InputStream file = new FileInputStream(new File(INPUT_FILENAME)); BufferedReader stream = new BufferedReader(new InputStreamReader(file)); String line = null; while ((line = stream.readLine()) != null) {
  • 8. String[] dataFromFile = line.split(","); if (dataFromFile[0].equalsIgnoreCase("TEAM")) { System.out.println("Running Test 2a"); test2a = setTeamAttribute(dataFromFile); getTeamAttribute(test2a); } else { System.out.println("Running Test 2b"); game2b = setGameAttribute(dataFromFile); getGameAttribute(game2b); } } stream.close(); file.close(); } catch (FileNotFoundException e) { System.err.println("File Not Found"); } catch (IOException e) { System.err.println("Could not read the File"); } System.out.println("Running Test 3a"); if (test1a.equals(test2a)) System.out.println("Team objects are equal"); else System.out.println("Team objects are not equal"); System.out.println("Running Test 3b"); if (game1b.equals(game2b)) System.out.println("Game objects are equal"); else System.out.println("Game objects are not equal"); } public static void getGameAttribute(Game game) { System.out.println(game.getGameId()); System.out.println(game.getHouseTeamId()); System.out.println(game.getGuestTeamId()); System.out.println(game.getHomeTeamScore()); System.out.println(game.getGuestTeamScore()); System.out.println(game.getDateOfGame());
  • 9. } public static Game setGameAttribute(String[] dataFromFile) { Game game = null; if (!Game.checkGameDate(Integer.parseInt(dataFromFile[4]))) System.err.println("Invalid game date: " + dataFromFile[4]); else { game = new Game(Integer.parseInt(dataFromFile[1]), dataFromFile[2], dataFromFile[3], Integer.parseInt(dataFromFile[4]), Integer.parseInt(dataFromFile[5]), Integer.parseInt(dataFromFile[6])); } return game; } public static void getTeamAttribute(Team team) { System.out.println(team.getTeamId()); System.out.println(team.getName()); System.out.println(team.getFirstName()); System.out.println(team.getLastName()); System.out.println(team.getPhoneNumber()); System.out.println(team.getEmailAddress()); } public static Team setTeamAttribute(String[] dataFromFile) { Team team = null; if (!Team.checkEmailAddress(dataFromFile[6])) System.err.println("Invalide e-mail address is missing (at sign)" + dataFromFile[6]); else { team = new Team(dataFromFile[1], dataFromFile[2], dataFromFile[3], dataFromFile[4], dataFromFile[5], dataFromFile[6]); } return team; } } Solution Team:
  • 10. public class Team { private String teamId; private String name; private String firstName; private String lastName; private String phoneNumber; private String emailAddress; Team(String teamId, String name, String firstName, String lastName, String phoneNumber, String emailAddress) { this.teamId = teamId; this.name = name; this.firstName = firstName; this.lastName = lastName; this.phoneNumber = phoneNumber; this.emailAddress = emailAddress; } public String getTeamId() { return teamId; } public void setTeamId(String teamId) { this.teamId = teamId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() {
  • 11. return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String emailAddress) { this.emailAddress = emailAddress; } public static boolean checkEmailAddress(String emailAddress) { return emailAddress.contains("@"); } @Override public String toString() { return "Team [teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ", lastName=" + lastName + ", phoneNumber=" + phoneNumber + ", emailAddress=" + emailAddress + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((emailAddress == null) ? 0 : emailAddress.hashCode()); result = prime * result + ((firstName == null) ? 0 : firstName.hashCode()); result = prime * result + ((lastName == null) ? 0 : lastName.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((phoneNumber == null) ? 0 : phoneNumber.hashCode());
  • 12. result = prime * result + ((teamId == null) ? 0 : teamId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Team other = (Team) obj; if (emailAddress == null) { if (other.emailAddress != null) return false; } else if (!emailAddress.equals(other.emailAddress)) return false; if (firstName == null) { if (other.firstName != null) return false; } else if (!firstName.equals(other.firstName)) return false; if (lastName == null) { if (other.lastName != null) return false; } else if (!lastName.equals(other.lastName)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (phoneNumber == null) { if (other.phoneNumber != null) return false; } else if (!phoneNumber.equals(other.phoneNumber))
  • 13. return false; if (teamId == null) { if (other.teamId != null) return false; } else if (!teamId.equals(other.teamId)) return false; return true; } } Game: public class Game { private int gameId; private String houseTeamId; private String guestTeamId; private int dateOfGame; private int homeTeamScore; private int guestTeamScore; Game(int gameId, String houseTeamId, String guestTeamId, int dateOfGame, int houseTeamScore, int guestTeamScore) { this.gameId = gameId; this.houseTeamId = houseTeamId; this.guestTeamId = guestTeamId; this.dateOfGame = dateOfGame; this.homeTeamScore = houseTeamScore; this.guestTeamScore = guestTeamScore; } public int getGameId() { return gameId; } public void setGameId(int gameId) { this.gameId = gameId; } public String getHouseTeamId() { return houseTeamId; }
  • 14. public void setHouseTeamId(String houseTeamId) { this.houseTeamId = houseTeamId; } public String getGuestTeamId() { return guestTeamId; } public void setGuestTeamId(String guestTeamId) { this.guestTeamId = guestTeamId; } public int getDateOfGame() { return dateOfGame; } public void setDateOfGame(int dateOfGame) { this.dateOfGame = dateOfGame; } public int getHomeTeamScore() { return homeTeamScore; } public void setHomeTeamScore(int homeTeamScore) { this.homeTeamScore = homeTeamScore; } public int getGuestTeamScore() { return guestTeamScore; } public void setGuestTeamScore(int guestTeamScore) { this.guestTeamScore = guestTeamScore; } public static boolean checkGameDate(int gameDate) { return gameDate >= 20160101 && gameDate <= 20160531; } @Override public String toString() { return "Game [gameId=" + gameId + ", houseTeamId=" + houseTeamId + ", guestTeamId=" + guestTeamId + ", dateOfGame=" + dateOfGame + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore="
  • 15. + guestTeamScore + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + dateOfGame; result = prime * result + gameId; result = prime * result + ((guestTeamId == null) ? 0 : guestTeamId.hashCode()); result = prime * result + guestTeamScore; result = prime * result + homeTeamScore; result = prime * result + ((houseTeamId == null) ? 0 : houseTeamId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Game other = (Game) obj; if (dateOfGame != other.dateOfGame) return false; if (gameId != other.gameId) return false; if (guestTeamId == null) { if (other.guestTeamId != null) return false; } else if (!guestTeamId.equals(other.guestTeamId)) return false; if (guestTeamScore != other.guestTeamScore) return false; if (homeTeamScore != other.homeTeamScore) return false;
  • 16. if (houseTeamId == null) { if (other.houseTeamId != null) return false; } else if (!houseTeamId.equals(other.houseTeamId)) return false; return true; } } Test: import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; public class Test { public static void main(String[] args) { final String INPUT_FILENAME = "hw1input.txt"; System.out.println("Running Test 1a"); Team test1a = new Team("test1aTeamId", "test1aTeamName", "test1aTeamFirstName", "test1aTeamLastName", "test1aTeamPhoneNumber", "test1a@TeamEmailAddress.com"); System.out.println(test1a.toString()); System.out.println("Running Test 1b"); Game game1b = new Game(1, "test1bteamId", "guest1bteamId", 20160412, 5, 2); System.out.println(game1b.toString()); Team test2a = null; Game game2b = null; try { InputStream file = new FileInputStream(new File(INPUT_FILENAME)); BufferedReader stream = new BufferedReader(new InputStreamReader(file)); String line = null; while ((line = stream.readLine()) != null) { String[] dataFromFile = line.split(","); if (dataFromFile[0].equalsIgnoreCase("TEAM")) {
  • 17. System.out.println("Running Test 2a"); test2a = setTeamAttribute(dataFromFile); getTeamAttribute(test2a); } else { System.out.println("Running Test 2b"); game2b = setGameAttribute(dataFromFile); getGameAttribute(game2b); } } stream.close(); file.close(); } catch (FileNotFoundException e) { System.err.println("File Not Found"); } catch (IOException e) { System.err.println("Could not read the File"); } System.out.println("Running Test 3a"); if (test1a.equals(test2a)) System.out.println("Team objects are equal"); else System.out.println("Team objects are not equal"); System.out.println("Running Test 3b"); if (game1b.equals(game2b)) System.out.println("Game objects are equal"); else System.out.println("Game objects are not equal"); } public static void getGameAttribute(Game game) { System.out.println(game.getGameId()); System.out.println(game.getHouseTeamId()); System.out.println(game.getGuestTeamId()); System.out.println(game.getHomeTeamScore()); System.out.println(game.getGuestTeamScore()); System.out.println(game.getDateOfGame()); } public static Game setGameAttribute(String[] dataFromFile) {
  • 18. Game game = null; if (!Game.checkGameDate(Integer.parseInt(dataFromFile[4]))) System.err.println("Invalid game date: " + dataFromFile[4]); else { game = new Game(Integer.parseInt(dataFromFile[1]), dataFromFile[2], dataFromFile[3], Integer.parseInt(dataFromFile[4]), Integer.parseInt(dataFromFile[5]), Integer.parseInt(dataFromFile[6])); } return game; } public static void getTeamAttribute(Team team) { System.out.println(team.getTeamId()); System.out.println(team.getName()); System.out.println(team.getFirstName()); System.out.println(team.getLastName()); System.out.println(team.getPhoneNumber()); System.out.println(team.getEmailAddress()); } public static Team setTeamAttribute(String[] dataFromFile) { Team team = null; if (!Team.checkEmailAddress(dataFromFile[6])) System.err.println("Invalide e-mail address is missing (at sign)" + dataFromFile[6]); else { team = new Team(dataFromFile[1], dataFromFile[2], dataFromFile[3], dataFromFile[4], dataFromFile[5], dataFromFile[6]); } return team; } }