SlideShare a Scribd company logo
1 of 21
Download to read offline
public class Team {
//Attributes
private String teamId;
private String name;
private String firstName;
private String lastName;
private String phone;
private String email;
/**
* Constructor
* param teamId
* param name
* param firstName
* param lastName
* param phone
* param email
*/
public Team(String teamId, String name, String firstName, String lastName, String phone,
String email) {
this.teamId = teamId;
this.name = name;
this.firstName = firstName;
this.lastName = lastName;
this.phone = phone;
this.email = email;
}
/**
* return the teamId
*/
public String getTeamId() {
return teamId;
}
/**
* return the name
*/
public String getName() {
return name;
}
/**
* return the firstName
*/
public String getFirstName() {
return firstName;
}
/**
* return the lastName
*/
public String getLastName() {
return lastName;
}
/**
* return the phone
*/
public String getPhone() {
return phone;
}
/**
* return the email
*/
public String getEmail() {
return email;
}
Override
public String toString() {
return "Team {teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ",
lastName=" + lastName
+ ", phone=" + phone + ", email=" + email + "}";
}
Override
public boolean equals(Object obj) {
if(obj == null)
return false;
else {
if(!(obj instanceof Team))
return false;
else {
Team other = (Team)obj;
if(this.teamId.equalsIgnoreCase(other.teamId) &&
this.name.equalsIgnoreCase(other.name) &&
this.firstName.equalsIgnoreCase(other.firstName) &&
this.lastName.equalsIgnoreCase(other.lastName) &&
this.phone.equalsIgnoreCase(other.phone) &&
this.email.equalsIgnoreCase(other.email))
return true;
else
return false;
}
}
}
/**
* Checks if the email id contains "(at sign)".
* Is yes returns true else returns false
*/
public boolean isValidEmail() {
return this.email.contains("(at sign)");
}
}
public class Game {
//Attributes
private String gameID;
private String homeTeamId;
private String guestTeamId;
private String gameDate;
private int homeTeamScore;
private int guestTeamScore;
/**
* Constructor
* param gameID
* param homeTeamId
* param guestTeamId
* param gameDate
* param homeTeamScore
* param guestTeamScore
*/
public Game(String gameID, String homeTeamId, String guestTeamId, String gameDate, int
homeTeamScore,
int guestTeamScore) {
this.gameID = gameID;
this.homeTeamId = homeTeamId;
this.guestTeamId = guestTeamId;
this.gameDate = gameDate;
this.homeTeamScore = homeTeamScore;
this.guestTeamScore = guestTeamScore;
}
/**
* return the gameID
*/
public String getGameID() {
return gameID;
}
/**
* return the homeTeamId
*/
public String getHomeTeamId() {
return homeTeamId;
}
/**
* return the guestTeamId
*/
public String getGuestTeamId() {
return guestTeamId;
}
/**
* return the gameDate
*/
public String getGameDate() {
return gameDate;
}
/**
* return the homeTeamScore
*/
public int getHomeTeamScore() {
return homeTeamScore;
}
/**
* return the guestTeamScore
*/
public int getGuestTeamScore() {
return guestTeamScore;
}
Override
public String toString() {
return "Game {gameID=" + gameID + ", homeTeamId=" + homeTeamId + ",
guestTeamId=" + guestTeamId + ", gameDate="
+ gameDate + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore=" +
guestTeamScore + "}";
}
Override
public boolean equals(Object obj) {
if(obj == null)
return false;
else {
if(!(obj instanceof Game))
return false;
else {
Game other = (Game)obj;
if(this.gameID.equalsIgnoreCase(other.gameID) &&
this.homeTeamId.equalsIgnoreCase(other.homeTeamId) &&
this.guestTeamId.equalsIgnoreCase(other.guestTeamId) &&
this.gameDate.equalsIgnoreCase(other.gameDate) &&
(this.homeTeamScore == other.homeTeamScore) &&
(this.guestTeamScore == other.guestTeamScore))
return true;
else
return false;
}
}
}
/**
* Checks if the game date is between 20160101 and 20160531
* If yes return true or return false
*/
public boolean isValidDate() {
int date = Integer.parseInt(gameDate);
return ((20160101 <= date) && (date <= 20160531));
}
}
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Test {
/**
* Creates a Team object with the parameter passed and returns it
* param teamId
* param name
* param firstName
* param lastName
* param phone
* param email
* return
*/
public static Team setTeamAttribute(String teamId, String name, String firstName, String
lastName, String phone, String email) {
return new Team(teamId, name, firstName, lastName, phone, email);
}
/**
* Creates a Game object with the parameter passed and returns it
* param gameID
* param homeTeamId
* param guestTeamId
* param gameDate
* param homeTeamScore
* param guestTeamScore
* return
*/
public static Game setGameAttribute(String gameID, String homeTeamId, String guestTeamId,
String gameDate, int homeTeamScore,
int guestTeamScore) {
return new Game(gameID, homeTeamId, guestTeamId, gameDate, homeTeamScore,
guestTeamScore);
}
public static void main(String[] args) {
//Input file
final String INPUT_FILENAME = "input/hw1input.txt";
//Test 1a
System.out.println("RUNNING TEST 1a");
Team team1 = new Team("1", "Team1", "Ann", "Matt", "123456", "abcxyz.com");
System.out.println(team1);
//Test 1b
System.out.println();
System.out.println("RUNNING TEST 1b");
Game game1 = new Game("101", "Home Team", "Guest Team", "20160303", 12, 18);
System.out.println(game1);
//Open input file
Scanner input = null;
Team team2 = null;
Game game2 = null;
try {
input = new Scanner(new File(INPUT_FILENAME));
//Read first line
String[] inputDtls = input.nextLine().split(",");
//Test 2a
if(inputDtls[0].equalsIgnoreCase("TEAM")) {
System.out.println();
System.out.println("RUNNING TEST 2a");
team2 = setTeamAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], inputDtls[5],
inputDtls[6]);
if(!team2.isValidEmail())
System.err.println("ERROR: Invalid email address. Is missing (at sign): " +
team2.getEmail());
//Display team1 attributes
System.out.println(team2.getTeamId());
System.out.println(team2.getName());
System.out.println(team2.getFirstName());
System.out.println(team2.getLastName());
System.out.println(team2.getPhone());
System.out.println(team2.getEmail());
}
//Read second line
inputDtls = input.nextLine().split(",");
//Test 2b
if(inputDtls[0].equalsIgnoreCase("GAME")) {
System.out.println();
System.out.println("RUNNING TEST 2b");
game2 = setGameAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4],
Integer.parseInt(inputDtls[5]), Integer.parseInt(inputDtls[6]));
if(!game2.isValidDate())
System.err.println("ERROR: Invalid game date: " + game2.getGameDate());
//Display team attributes
System.out.println(game2.getGameID());
System.out.println(game2.getHomeTeamId());
System.out.println(game2.getGuestTeamId());
System.out.println(game2.getGameDate());
System.out.println(game2.getHomeTeamScore());
System.out.println(game2.getGuestTeamScore());
}
} catch(FileNotFoundException fnfe) {
System.err.println("Data file not found");
} finally {
//Close file
if(input != null)
input.close();
}
//Test 3a
System.out.println();
System.out.println("RUNNING TEST 3a");
System.out.println("TEAM 1 : " + team1);
System.out.println("TEAM 2 : " + team2);
if(team1.equals(team2))
System.out.println("The two teams are same");
else
System.out.println("The two teams not are same");
//Test 3b
System.out.println();
System.out.println("RUNNING TEST 3b");
System.out.println("GAME 1 : " + game1);
System.out.println("GAME 2 : " + game2);
if(game1.equals(game2))
System.out.println("The two games are same");
else
System.out.println("The two games not are same");
}
}
SAMPLE OUTPUT:
RUNNING TEST 1a
Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456,
email=abcxyz.com}
RUNNING TEST 1b
Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team,
gameDate=20160303, homeTeamScore=12, guestTeamScore=18}
RUNNING TEST 2a
ERROR: Invalid email address. Is missing (at sign): roadrunner#gmail.com
1
Road Runner
David
Brown
303-123-4567
roadrunner#gmail.com
RUNNING TEST 2b
ERROR: Invalid game date: 20150105
101
1
2
20150105
4
3
RUNNING TEST 3a
TEAM 1 : Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456,
email=abcxyz.com}
TEAM 2 : Team {teamId=1, name=Road Runner, firstName=David, lastName=Brown,
phone=303-123-4567, email=roadrunner#gmail.com}
The two teams not are same
RUNNING TEST 3b
GAME 1 : Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team,
gameDate=20160303, homeTeamScore=12, guestTeamScore=18}
GAME 2 : Game {gameID=101, homeTeamId=1, guestTeamId=2, gameDate=20150105,
homeTeamScore=4, guestTeamScore=3}
The two games not are same
Solution
public class Team {
//Attributes
private String teamId;
private String name;
private String firstName;
private String lastName;
private String phone;
private String email;
/**
* Constructor
* param teamId
* param name
* param firstName
* param lastName
* param phone
* param email
*/
public Team(String teamId, String name, String firstName, String lastName, String phone,
String email) {
this.teamId = teamId;
this.name = name;
this.firstName = firstName;
this.lastName = lastName;
this.phone = phone;
this.email = email;
}
/**
* return the teamId
*/
public String getTeamId() {
return teamId;
}
/**
* return the name
*/
public String getName() {
return name;
}
/**
* return the firstName
*/
public String getFirstName() {
return firstName;
}
/**
* return the lastName
*/
public String getLastName() {
return lastName;
}
/**
* return the phone
*/
public String getPhone() {
return phone;
}
/**
* return the email
*/
public String getEmail() {
return email;
}
Override
public String toString() {
return "Team {teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ",
lastName=" + lastName
+ ", phone=" + phone + ", email=" + email + "}";
}
Override
public boolean equals(Object obj) {
if(obj == null)
return false;
else {
if(!(obj instanceof Team))
return false;
else {
Team other = (Team)obj;
if(this.teamId.equalsIgnoreCase(other.teamId) &&
this.name.equalsIgnoreCase(other.name) &&
this.firstName.equalsIgnoreCase(other.firstName) &&
this.lastName.equalsIgnoreCase(other.lastName) &&
this.phone.equalsIgnoreCase(other.phone) &&
this.email.equalsIgnoreCase(other.email))
return true;
else
return false;
}
}
}
/**
* Checks if the email id contains "(at sign)".
* Is yes returns true else returns false
*/
public boolean isValidEmail() {
return this.email.contains("(at sign)");
}
}
public class Game {
//Attributes
private String gameID;
private String homeTeamId;
private String guestTeamId;
private String gameDate;
private int homeTeamScore;
private int guestTeamScore;
/**
* Constructor
* param gameID
* param homeTeamId
* param guestTeamId
* param gameDate
* param homeTeamScore
* param guestTeamScore
*/
public Game(String gameID, String homeTeamId, String guestTeamId, String gameDate, int
homeTeamScore,
int guestTeamScore) {
this.gameID = gameID;
this.homeTeamId = homeTeamId;
this.guestTeamId = guestTeamId;
this.gameDate = gameDate;
this.homeTeamScore = homeTeamScore;
this.guestTeamScore = guestTeamScore;
}
/**
* return the gameID
*/
public String getGameID() {
return gameID;
}
/**
* return the homeTeamId
*/
public String getHomeTeamId() {
return homeTeamId;
}
/**
* return the guestTeamId
*/
public String getGuestTeamId() {
return guestTeamId;
}
/**
* return the gameDate
*/
public String getGameDate() {
return gameDate;
}
/**
* return the homeTeamScore
*/
public int getHomeTeamScore() {
return homeTeamScore;
}
/**
* return the guestTeamScore
*/
public int getGuestTeamScore() {
return guestTeamScore;
}
Override
public String toString() {
return "Game {gameID=" + gameID + ", homeTeamId=" + homeTeamId + ",
guestTeamId=" + guestTeamId + ", gameDate="
+ gameDate + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore=" +
guestTeamScore + "}";
}
Override
public boolean equals(Object obj) {
if(obj == null)
return false;
else {
if(!(obj instanceof Game))
return false;
else {
Game other = (Game)obj;
if(this.gameID.equalsIgnoreCase(other.gameID) &&
this.homeTeamId.equalsIgnoreCase(other.homeTeamId) &&
this.guestTeamId.equalsIgnoreCase(other.guestTeamId) &&
this.gameDate.equalsIgnoreCase(other.gameDate) &&
(this.homeTeamScore == other.homeTeamScore) &&
(this.guestTeamScore == other.guestTeamScore))
return true;
else
return false;
}
}
}
/**
* Checks if the game date is between 20160101 and 20160531
* If yes return true or return false
*/
public boolean isValidDate() {
int date = Integer.parseInt(gameDate);
return ((20160101 <= date) && (date <= 20160531));
}
}
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class Test {
/**
* Creates a Team object with the parameter passed and returns it
* param teamId
* param name
* param firstName
* param lastName
* param phone
* param email
* return
*/
public static Team setTeamAttribute(String teamId, String name, String firstName, String
lastName, String phone, String email) {
return new Team(teamId, name, firstName, lastName, phone, email);
}
/**
* Creates a Game object with the parameter passed and returns it
* param gameID
* param homeTeamId
* param guestTeamId
* param gameDate
* param homeTeamScore
* param guestTeamScore
* return
*/
public static Game setGameAttribute(String gameID, String homeTeamId, String guestTeamId,
String gameDate, int homeTeamScore,
int guestTeamScore) {
return new Game(gameID, homeTeamId, guestTeamId, gameDate, homeTeamScore,
guestTeamScore);
}
public static void main(String[] args) {
//Input file
final String INPUT_FILENAME = "input/hw1input.txt";
//Test 1a
System.out.println("RUNNING TEST 1a");
Team team1 = new Team("1", "Team1", "Ann", "Matt", "123456", "abcxyz.com");
System.out.println(team1);
//Test 1b
System.out.println();
System.out.println("RUNNING TEST 1b");
Game game1 = new Game("101", "Home Team", "Guest Team", "20160303", 12, 18);
System.out.println(game1);
//Open input file
Scanner input = null;
Team team2 = null;
Game game2 = null;
try {
input = new Scanner(new File(INPUT_FILENAME));
//Read first line
String[] inputDtls = input.nextLine().split(",");
//Test 2a
if(inputDtls[0].equalsIgnoreCase("TEAM")) {
System.out.println();
System.out.println("RUNNING TEST 2a");
team2 = setTeamAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], inputDtls[5],
inputDtls[6]);
if(!team2.isValidEmail())
System.err.println("ERROR: Invalid email address. Is missing (at sign): " +
team2.getEmail());
//Display team1 attributes
System.out.println(team2.getTeamId());
System.out.println(team2.getName());
System.out.println(team2.getFirstName());
System.out.println(team2.getLastName());
System.out.println(team2.getPhone());
System.out.println(team2.getEmail());
}
//Read second line
inputDtls = input.nextLine().split(",");
//Test 2b
if(inputDtls[0].equalsIgnoreCase("GAME")) {
System.out.println();
System.out.println("RUNNING TEST 2b");
game2 = setGameAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4],
Integer.parseInt(inputDtls[5]), Integer.parseInt(inputDtls[6]));
if(!game2.isValidDate())
System.err.println("ERROR: Invalid game date: " + game2.getGameDate());
//Display team attributes
System.out.println(game2.getGameID());
System.out.println(game2.getHomeTeamId());
System.out.println(game2.getGuestTeamId());
System.out.println(game2.getGameDate());
System.out.println(game2.getHomeTeamScore());
System.out.println(game2.getGuestTeamScore());
}
} catch(FileNotFoundException fnfe) {
System.err.println("Data file not found");
} finally {
//Close file
if(input != null)
input.close();
}
//Test 3a
System.out.println();
System.out.println("RUNNING TEST 3a");
System.out.println("TEAM 1 : " + team1);
System.out.println("TEAM 2 : " + team2);
if(team1.equals(team2))
System.out.println("The two teams are same");
else
System.out.println("The two teams not are same");
//Test 3b
System.out.println();
System.out.println("RUNNING TEST 3b");
System.out.println("GAME 1 : " + game1);
System.out.println("GAME 2 : " + game2);
if(game1.equals(game2))
System.out.println("The two games are same");
else
System.out.println("The two games not are same");
}
}
SAMPLE OUTPUT:
RUNNING TEST 1a
Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456,
email=abcxyz.com}
RUNNING TEST 1b
Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team,
gameDate=20160303, homeTeamScore=12, guestTeamScore=18}
RUNNING TEST 2a
ERROR: Invalid email address. Is missing (at sign): roadrunner#gmail.com
1
Road Runner
David
Brown
303-123-4567
roadrunner#gmail.com
RUNNING TEST 2b
ERROR: Invalid game date: 20150105
101
1
2
20150105
4
3
RUNNING TEST 3a
TEAM 1 : Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456,
email=abcxyz.com}
TEAM 2 : Team {teamId=1, name=Road Runner, firstName=David, lastName=Brown,
phone=303-123-4567, email=roadrunner#gmail.com}
The two teams not are same
RUNNING TEST 3b
GAME 1 : Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team,
gameDate=20160303, homeTeamScore=12, guestTeamScore=18}
GAME 2 : Game {gameID=101, homeTeamId=1, guestTeamId=2, gameDate=20150105,
homeTeamScore=4, guestTeamScore=3}
The two games not are same

More Related Content

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

Keep getting a null pointer exception for some odd reasonim creati.pdf
Keep getting a null pointer exception for some odd reasonim creati.pdfKeep getting a null pointer exception for some odd reasonim creati.pdf
Keep getting a null pointer exception for some odd reasonim creati.pdfAroraRajinder1
 
question.(player, entity ,field and base.java codes are given)Stop.pdf
question.(player, entity ,field and base.java codes are given)Stop.pdfquestion.(player, entity ,field and base.java codes are given)Stop.pdf
question.(player, entity ,field and base.java codes are given)Stop.pdfshahidqamar17
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdfkavithaarp
 
Here is the game description- Here is the sample game- Goal- Your goal (1).pdf
Here is the game description- Here is the sample game- Goal- Your goal (1).pdfHere is the game description- Here is the sample game- Goal- Your goal (1).pdf
Here is the game description- Here is the sample game- Goal- Your goal (1).pdftrishulinoverseas1
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfaggarwalshoppe14
 
mainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdfmainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdffathimafancyjeweller
 
Goal- Your goal in this assignment is to write a Java program that sim.pdf
Goal- Your goal in this assignment is to write a Java program that sim.pdfGoal- Your goal in this assignment is to write a Java program that sim.pdf
Goal- Your goal in this assignment is to write a Java program that sim.pdfaaicommunication34
 
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.pdfrozakashif85
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfaggarwalshoppe14
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfinfo430661
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfaggarwalshoppe14
 
@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, .pdfaplolomedicalstoremr
 
Please use java to write the program that simulates the card game!!! T (1).pdf
Please use java to write the program that simulates the card game!!! T (1).pdfPlease use java to write the program that simulates the card game!!! T (1).pdf
Please use java to write the program that simulates the card game!!! T (1).pdfadmin463580
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfShaiAlmog1
 
public class Storm {   Attributes    private String stormName;.pdf
public class Storm {   Attributes    private String stormName;.pdfpublic class Storm {   Attributes    private String stormName;.pdf
public class Storm {   Attributes    private String stormName;.pdfsharnapiyush773
 
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docx
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docxCS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docx
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docxannettsparrow
 
Mocks introduction
Mocks introductionMocks introduction
Mocks introductionSperasoft
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdflakshmijewellery
 
TilePUzzle class Anderson, Franceschi public class TilePu.docx
 TilePUzzle class Anderson, Franceschi public class TilePu.docx TilePUzzle class Anderson, Franceschi public class TilePu.docx
TilePUzzle class Anderson, Franceschi public class TilePu.docxKomlin1
 
import java.util.Scanner;public class Fraction {   instan.pdf
import java.util.Scanner;public class Fraction {    instan.pdfimport java.util.Scanner;public class Fraction {    instan.pdf
import java.util.Scanner;public class Fraction {   instan.pdfapleathers
 

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

Keep getting a null pointer exception for some odd reasonim creati.pdf
Keep getting a null pointer exception for some odd reasonim creati.pdfKeep getting a null pointer exception for some odd reasonim creati.pdf
Keep getting a null pointer exception for some odd reasonim creati.pdf
 
question.(player, entity ,field and base.java codes are given)Stop.pdf
question.(player, entity ,field and base.java codes are given)Stop.pdfquestion.(player, entity ,field and base.java codes are given)Stop.pdf
question.(player, entity ,field and base.java codes are given)Stop.pdf
 
public interface Game Note interface in place of class { .pdf
public interface Game  Note interface in place of class { .pdfpublic interface Game  Note interface in place of class { .pdf
public interface Game Note interface in place of class { .pdf
 
Here is the game description- Here is the sample game- Goal- Your goal (1).pdf
Here is the game description- Here is the sample game- Goal- Your goal (1).pdfHere is the game description- Here is the sample game- Goal- Your goal (1).pdf
Here is the game description- Here is the sample game- Goal- Your goal (1).pdf
 
Here are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdfHere are the instructions and then the code in a sec. Please R.pdf
Here are the instructions and then the code in a sec. Please R.pdf
 
mainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdfmainpublic class AssignmentThree {    public static void ma.pdf
mainpublic class AssignmentThree {    public static void ma.pdf
 
Goal- Your goal in this assignment is to write a Java program that sim.pdf
Goal- Your goal in this assignment is to write a Java program that sim.pdfGoal- Your goal in this assignment is to write a Java program that sim.pdf
Goal- Your goal in this assignment is to write a Java program that sim.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
 
I really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdfI really need some help if I have this right so far. PLEASE CHANG.pdf
I really need some help if I have this right so far. PLEASE CHANG.pdf
 
package com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdfpackage com.tictactoe; public class Main {public void play() {.pdf
package com.tictactoe; public class Main {public void play() {.pdf
 
I really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.pdfI really need some help if I have this right so far. Please Resub.pdf
I really need some help if I have this right so far. Please Resub.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
 
Please use java to write the program that simulates the card game!!! T (1).pdf
Please use java to write the program that simulates the card game!!! T (1).pdfPlease use java to write the program that simulates the card game!!! T (1).pdf
Please use java to write the program that simulates the card game!!! T (1).pdf
 
Creating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdfCreating a Facebook Clone - Part XX.pdf
Creating a Facebook Clone - Part XX.pdf
 
public class Storm {   Attributes    private String stormName;.pdf
public class Storm {   Attributes    private String stormName;.pdfpublic class Storm {   Attributes    private String stormName;.pdf
public class Storm {   Attributes    private String stormName;.pdf
 
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docx
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docxCS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docx
CS117-S18-AlharbiMohammed-master.gitignore.class.ctxt..docx
 
Mocks introduction
Mocks introductionMocks introduction
Mocks introduction
 
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdfCreate a Code that will add an Add, Edi, and Delete button to the GU.pdf
Create a Code that will add an Add, Edi, and Delete button to the GU.pdf
 
TilePUzzle class Anderson, Franceschi public class TilePu.docx
 TilePUzzle class Anderson, Franceschi public class TilePu.docx TilePUzzle class Anderson, Franceschi public class TilePu.docx
TilePUzzle class Anderson, Franceschi public class TilePu.docx
 
import java.util.Scanner;public class Fraction {   instan.pdf
import java.util.Scanner;public class Fraction {    instan.pdfimport java.util.Scanner;public class Fraction {    instan.pdf
import java.util.Scanner;public class Fraction {   instan.pdf
 

More from anushasarees

Properties of enantiomers Their NMR and IR spec.pdf
                     Properties of enantiomers Their NMR and IR spec.pdf                     Properties of enantiomers Their NMR and IR spec.pdf
Properties of enantiomers Their NMR and IR spec.pdfanushasarees
 
O2 will be released as Na+ will not get reduce bu.pdf
                     O2 will be released as Na+ will not get reduce bu.pdf                     O2 will be released as Na+ will not get reduce bu.pdf
O2 will be released as Na+ will not get reduce bu.pdfanushasarees
 
Huntingtons disease and other hereditary diseas.pdf
                     Huntingtons disease and other hereditary diseas.pdf                     Huntingtons disease and other hereditary diseas.pdf
Huntingtons disease and other hereditary diseas.pdfanushasarees
 
ionic character BaF MgO FeO SO2 N2 .pdf
                     ionic character BaF  MgO  FeO  SO2  N2  .pdf                     ionic character BaF  MgO  FeO  SO2  N2  .pdf
ionic character BaF MgO FeO SO2 N2 .pdfanushasarees
 
Nitrogen can hold up to 4 bonds. In sodium amide.pdf
                     Nitrogen can hold up to 4 bonds.  In sodium amide.pdf                     Nitrogen can hold up to 4 bonds.  In sodium amide.pdf
Nitrogen can hold up to 4 bonds. In sodium amide.pdfanushasarees
 
C. hydrogen bonding. between N and H of differen.pdf
                     C. hydrogen bonding.  between N and H of differen.pdf                     C. hydrogen bonding.  between N and H of differen.pdf
C. hydrogen bonding. between N and H of differen.pdfanushasarees
 
  import java.util.;import acm.program.;public class FlightPla.pdf
  import java.util.;import acm.program.;public class FlightPla.pdf  import java.util.;import acm.program.;public class FlightPla.pdf
  import java.util.;import acm.program.;public class FlightPla.pdfanushasarees
 
We Know that    Amines are generally basic in naturebecause of th.pdf
We Know that    Amines are generally basic in naturebecause of th.pdfWe Know that    Amines are generally basic in naturebecause of th.pdf
We Know that    Amines are generally basic in naturebecause of th.pdfanushasarees
 
There are so many java Input Output classes that are available in it.pdf
There are so many java Input Output classes that are available in it.pdfThere are so many java Input Output classes that are available in it.pdf
There are so many java Input Output classes that are available in it.pdfanushasarees
 
Three are ways to protect unused switch ports Option B,D and E is.pdf
Three are ways to protect unused switch ports Option B,D and E is.pdfThree are ways to protect unused switch ports Option B,D and E is.pdf
Three are ways to protect unused switch ports Option B,D and E is.pdfanushasarees
 
The water turns green because the copper(II)sulfate is breaking apar.pdf
The water turns green because the copper(II)sulfate is breaking apar.pdfThe water turns green because the copper(II)sulfate is breaking apar.pdf
The water turns green because the copper(II)sulfate is breaking apar.pdfanushasarees
 
The mutation is known as inversion. In this a segment from one chrom.pdf
The mutation is known as inversion. In this a segment from one chrom.pdfThe mutation is known as inversion. In this a segment from one chrom.pdf
The mutation is known as inversion. In this a segment from one chrom.pdfanushasarees
 
The main organelles in protein sorting and targeting are Rough endop.pdf
The main organelles in protein sorting and targeting are Rough endop.pdfThe main organelles in protein sorting and targeting are Rough endop.pdf
The main organelles in protein sorting and targeting are Rough endop.pdfanushasarees
 
Successfully supporting managerial decision-making is critically dep.pdf
Successfully supporting managerial decision-making is critically dep.pdfSuccessfully supporting managerial decision-making is critically dep.pdf
Successfully supporting managerial decision-making is critically dep.pdfanushasarees
 
SolutionTo know that the team has identified all of the significa.pdf
SolutionTo know that the team has identified all of the significa.pdfSolutionTo know that the team has identified all of the significa.pdf
SolutionTo know that the team has identified all of the significa.pdfanushasarees
 
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdf
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdfSolutiona) Maximum bus speed = bus driver delay + propagation del.pdf
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdfanushasarees
 
Solution Polymerase chain reaction is process in which several co.pdf
Solution Polymerase chain reaction is process in which several co.pdfSolution Polymerase chain reaction is process in which several co.pdf
Solution Polymerase chain reaction is process in which several co.pdfanushasarees
 
Doubling [NO] would quadruple the rate .pdf
                     Doubling [NO] would quadruple the rate           .pdf                     Doubling [NO] would quadruple the rate           .pdf
Doubling [NO] would quadruple the rate .pdfanushasarees
 
Correct answer F)4.0 .pdf
                     Correct answer F)4.0                            .pdf                     Correct answer F)4.0                            .pdf
Correct answer F)4.0 .pdfanushasarees
 
D.) The system is neither at steady state or equi.pdf
                     D.) The system is neither at steady state or equi.pdf                     D.) The system is neither at steady state or equi.pdf
D.) The system is neither at steady state or equi.pdfanushasarees
 

More from anushasarees (20)

Properties of enantiomers Their NMR and IR spec.pdf
                     Properties of enantiomers Their NMR and IR spec.pdf                     Properties of enantiomers Their NMR and IR spec.pdf
Properties of enantiomers Their NMR and IR spec.pdf
 
O2 will be released as Na+ will not get reduce bu.pdf
                     O2 will be released as Na+ will not get reduce bu.pdf                     O2 will be released as Na+ will not get reduce bu.pdf
O2 will be released as Na+ will not get reduce bu.pdf
 
Huntingtons disease and other hereditary diseas.pdf
                     Huntingtons disease and other hereditary diseas.pdf                     Huntingtons disease and other hereditary diseas.pdf
Huntingtons disease and other hereditary diseas.pdf
 
ionic character BaF MgO FeO SO2 N2 .pdf
                     ionic character BaF  MgO  FeO  SO2  N2  .pdf                     ionic character BaF  MgO  FeO  SO2  N2  .pdf
ionic character BaF MgO FeO SO2 N2 .pdf
 
Nitrogen can hold up to 4 bonds. In sodium amide.pdf
                     Nitrogen can hold up to 4 bonds.  In sodium amide.pdf                     Nitrogen can hold up to 4 bonds.  In sodium amide.pdf
Nitrogen can hold up to 4 bonds. In sodium amide.pdf
 
C. hydrogen bonding. between N and H of differen.pdf
                     C. hydrogen bonding.  between N and H of differen.pdf                     C. hydrogen bonding.  between N and H of differen.pdf
C. hydrogen bonding. between N and H of differen.pdf
 
  import java.util.;import acm.program.;public class FlightPla.pdf
  import java.util.;import acm.program.;public class FlightPla.pdf  import java.util.;import acm.program.;public class FlightPla.pdf
  import java.util.;import acm.program.;public class FlightPla.pdf
 
We Know that    Amines are generally basic in naturebecause of th.pdf
We Know that    Amines are generally basic in naturebecause of th.pdfWe Know that    Amines are generally basic in naturebecause of th.pdf
We Know that    Amines are generally basic in naturebecause of th.pdf
 
There are so many java Input Output classes that are available in it.pdf
There are so many java Input Output classes that are available in it.pdfThere are so many java Input Output classes that are available in it.pdf
There are so many java Input Output classes that are available in it.pdf
 
Three are ways to protect unused switch ports Option B,D and E is.pdf
Three are ways to protect unused switch ports Option B,D and E is.pdfThree are ways to protect unused switch ports Option B,D and E is.pdf
Three are ways to protect unused switch ports Option B,D and E is.pdf
 
The water turns green because the copper(II)sulfate is breaking apar.pdf
The water turns green because the copper(II)sulfate is breaking apar.pdfThe water turns green because the copper(II)sulfate is breaking apar.pdf
The water turns green because the copper(II)sulfate is breaking apar.pdf
 
The mutation is known as inversion. In this a segment from one chrom.pdf
The mutation is known as inversion. In this a segment from one chrom.pdfThe mutation is known as inversion. In this a segment from one chrom.pdf
The mutation is known as inversion. In this a segment from one chrom.pdf
 
The main organelles in protein sorting and targeting are Rough endop.pdf
The main organelles in protein sorting and targeting are Rough endop.pdfThe main organelles in protein sorting and targeting are Rough endop.pdf
The main organelles in protein sorting and targeting are Rough endop.pdf
 
Successfully supporting managerial decision-making is critically dep.pdf
Successfully supporting managerial decision-making is critically dep.pdfSuccessfully supporting managerial decision-making is critically dep.pdf
Successfully supporting managerial decision-making is critically dep.pdf
 
SolutionTo know that the team has identified all of the significa.pdf
SolutionTo know that the team has identified all of the significa.pdfSolutionTo know that the team has identified all of the significa.pdf
SolutionTo know that the team has identified all of the significa.pdf
 
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdf
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdfSolutiona) Maximum bus speed = bus driver delay + propagation del.pdf
Solutiona) Maximum bus speed = bus driver delay + propagation del.pdf
 
Solution Polymerase chain reaction is process in which several co.pdf
Solution Polymerase chain reaction is process in which several co.pdfSolution Polymerase chain reaction is process in which several co.pdf
Solution Polymerase chain reaction is process in which several co.pdf
 
Doubling [NO] would quadruple the rate .pdf
                     Doubling [NO] would quadruple the rate           .pdf                     Doubling [NO] would quadruple the rate           .pdf
Doubling [NO] would quadruple the rate .pdf
 
Correct answer F)4.0 .pdf
                     Correct answer F)4.0                            .pdf                     Correct answer F)4.0                            .pdf
Correct answer F)4.0 .pdf
 
D.) The system is neither at steady state or equi.pdf
                     D.) The system is neither at steady state or equi.pdf                     D.) The system is neither at steady state or equi.pdf
D.) The system is neither at steady state or equi.pdf
 

Recently uploaded

Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFVivekanand Anglo Vedic Academy
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint23600690
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxneillewis46
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17Celine George
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 

Recently uploaded (20)

Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
Book Review of Run For Your Life Powerpoint
Book Review of Run For Your Life PowerpointBook Review of Run For Your Life Powerpoint
Book Review of Run For Your Life Powerpoint
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 

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

  • 1. public class Team { //Attributes private String teamId; private String name; private String firstName; private String lastName; private String phone; private String email; /** * Constructor * param teamId * param name * param firstName * param lastName * param phone * param email */ public Team(String teamId, String name, String firstName, String lastName, String phone, String email) { this.teamId = teamId; this.name = name; this.firstName = firstName; this.lastName = lastName; this.phone = phone; this.email = email; } /** * return the teamId */ public String getTeamId() { return teamId; } /** * return the name */
  • 2. public String getName() { return name; } /** * return the firstName */ public String getFirstName() { return firstName; } /** * return the lastName */ public String getLastName() { return lastName; } /** * return the phone */ public String getPhone() { return phone; } /** * return the email */ public String getEmail() { return email; } Override public String toString() { return "Team {teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ", lastName=" + lastName + ", phone=" + phone + ", email=" + email + "}"; } Override public boolean equals(Object obj) {
  • 3. if(obj == null) return false; else { if(!(obj instanceof Team)) return false; else { Team other = (Team)obj; if(this.teamId.equalsIgnoreCase(other.teamId) && this.name.equalsIgnoreCase(other.name) && this.firstName.equalsIgnoreCase(other.firstName) && this.lastName.equalsIgnoreCase(other.lastName) && this.phone.equalsIgnoreCase(other.phone) && this.email.equalsIgnoreCase(other.email)) return true; else return false; } } } /** * Checks if the email id contains "(at sign)". * Is yes returns true else returns false */ public boolean isValidEmail() { return this.email.contains("(at sign)"); } } public class Game { //Attributes private String gameID; private String homeTeamId; private String guestTeamId; private String gameDate; private int homeTeamScore;
  • 4. private int guestTeamScore; /** * Constructor * param gameID * param homeTeamId * param guestTeamId * param gameDate * param homeTeamScore * param guestTeamScore */ public Game(String gameID, String homeTeamId, String guestTeamId, String gameDate, int homeTeamScore, int guestTeamScore) { this.gameID = gameID; this.homeTeamId = homeTeamId; this.guestTeamId = guestTeamId; this.gameDate = gameDate; this.homeTeamScore = homeTeamScore; this.guestTeamScore = guestTeamScore; } /** * return the gameID */ public String getGameID() { return gameID; } /** * return the homeTeamId */ public String getHomeTeamId() { return homeTeamId; } /** * return the guestTeamId */
  • 5. public String getGuestTeamId() { return guestTeamId; } /** * return the gameDate */ public String getGameDate() { return gameDate; } /** * return the homeTeamScore */ public int getHomeTeamScore() { return homeTeamScore; } /** * return the guestTeamScore */ public int getGuestTeamScore() { return guestTeamScore; } Override public String toString() { return "Game {gameID=" + gameID + ", homeTeamId=" + homeTeamId + ", guestTeamId=" + guestTeamId + ", gameDate=" + gameDate + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore=" + guestTeamScore + "}"; } Override public boolean equals(Object obj) { if(obj == null) return false; else { if(!(obj instanceof Game)) return false; else {
  • 6. Game other = (Game)obj; if(this.gameID.equalsIgnoreCase(other.gameID) && this.homeTeamId.equalsIgnoreCase(other.homeTeamId) && this.guestTeamId.equalsIgnoreCase(other.guestTeamId) && this.gameDate.equalsIgnoreCase(other.gameDate) && (this.homeTeamScore == other.homeTeamScore) && (this.guestTeamScore == other.guestTeamScore)) return true; else return false; } } } /** * Checks if the game date is between 20160101 and 20160531 * If yes return true or return false */ public boolean isValidDate() { int date = Integer.parseInt(gameDate); return ((20160101 <= date) && (date <= 20160531)); } } import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class Test { /** * Creates a Team object with the parameter passed and returns it * param teamId * param name * param firstName * param lastName * param phone
  • 7. * param email * return */ public static Team setTeamAttribute(String teamId, String name, String firstName, String lastName, String phone, String email) { return new Team(teamId, name, firstName, lastName, phone, email); } /** * Creates a Game object with the parameter passed and returns it * param gameID * param homeTeamId * param guestTeamId * param gameDate * param homeTeamScore * param guestTeamScore * return */ public static Game setGameAttribute(String gameID, String homeTeamId, String guestTeamId, String gameDate, int homeTeamScore, int guestTeamScore) { return new Game(gameID, homeTeamId, guestTeamId, gameDate, homeTeamScore, guestTeamScore); } public static void main(String[] args) { //Input file final String INPUT_FILENAME = "input/hw1input.txt"; //Test 1a System.out.println("RUNNING TEST 1a"); Team team1 = new Team("1", "Team1", "Ann", "Matt", "123456", "abcxyz.com"); System.out.println(team1); //Test 1b System.out.println();
  • 8. System.out.println("RUNNING TEST 1b"); Game game1 = new Game("101", "Home Team", "Guest Team", "20160303", 12, 18); System.out.println(game1); //Open input file Scanner input = null; Team team2 = null; Game game2 = null; try { input = new Scanner(new File(INPUT_FILENAME)); //Read first line String[] inputDtls = input.nextLine().split(","); //Test 2a if(inputDtls[0].equalsIgnoreCase("TEAM")) { System.out.println(); System.out.println("RUNNING TEST 2a"); team2 = setTeamAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], inputDtls[5], inputDtls[6]); if(!team2.isValidEmail()) System.err.println("ERROR: Invalid email address. Is missing (at sign): " + team2.getEmail()); //Display team1 attributes System.out.println(team2.getTeamId()); System.out.println(team2.getName()); System.out.println(team2.getFirstName()); System.out.println(team2.getLastName()); System.out.println(team2.getPhone()); System.out.println(team2.getEmail()); } //Read second line inputDtls = input.nextLine().split(","); //Test 2b
  • 9. if(inputDtls[0].equalsIgnoreCase("GAME")) { System.out.println(); System.out.println("RUNNING TEST 2b"); game2 = setGameAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], Integer.parseInt(inputDtls[5]), Integer.parseInt(inputDtls[6])); if(!game2.isValidDate()) System.err.println("ERROR: Invalid game date: " + game2.getGameDate()); //Display team attributes System.out.println(game2.getGameID()); System.out.println(game2.getHomeTeamId()); System.out.println(game2.getGuestTeamId()); System.out.println(game2.getGameDate()); System.out.println(game2.getHomeTeamScore()); System.out.println(game2.getGuestTeamScore()); } } catch(FileNotFoundException fnfe) { System.err.println("Data file not found"); } finally { //Close file if(input != null) input.close(); } //Test 3a System.out.println(); System.out.println("RUNNING TEST 3a"); System.out.println("TEAM 1 : " + team1); System.out.println("TEAM 2 : " + team2); if(team1.equals(team2)) System.out.println("The two teams are same"); else System.out.println("The two teams not are same");
  • 10. //Test 3b System.out.println(); System.out.println("RUNNING TEST 3b"); System.out.println("GAME 1 : " + game1); System.out.println("GAME 2 : " + game2); if(game1.equals(game2)) System.out.println("The two games are same"); else System.out.println("The two games not are same"); } } SAMPLE OUTPUT: RUNNING TEST 1a Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456, email=abcxyz.com} RUNNING TEST 1b Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team, gameDate=20160303, homeTeamScore=12, guestTeamScore=18} RUNNING TEST 2a ERROR: Invalid email address. Is missing (at sign): roadrunner#gmail.com 1 Road Runner David Brown 303-123-4567 roadrunner#gmail.com RUNNING TEST 2b ERROR: Invalid game date: 20150105 101 1 2 20150105 4 3 RUNNING TEST 3a TEAM 1 : Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456,
  • 11. email=abcxyz.com} TEAM 2 : Team {teamId=1, name=Road Runner, firstName=David, lastName=Brown, phone=303-123-4567, email=roadrunner#gmail.com} The two teams not are same RUNNING TEST 3b GAME 1 : Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team, gameDate=20160303, homeTeamScore=12, guestTeamScore=18} GAME 2 : Game {gameID=101, homeTeamId=1, guestTeamId=2, gameDate=20150105, homeTeamScore=4, guestTeamScore=3} The two games not are same Solution public class Team { //Attributes private String teamId; private String name; private String firstName; private String lastName; private String phone; private String email; /** * Constructor * param teamId * param name * param firstName * param lastName * param phone * param email */ public Team(String teamId, String name, String firstName, String lastName, String phone, String email) { this.teamId = teamId; this.name = name; this.firstName = firstName; this.lastName = lastName;
  • 12. this.phone = phone; this.email = email; } /** * return the teamId */ public String getTeamId() { return teamId; } /** * return the name */ public String getName() { return name; } /** * return the firstName */ public String getFirstName() { return firstName; } /** * return the lastName */ public String getLastName() { return lastName; } /** * return the phone */ public String getPhone() { return phone; } /** * return the email */
  • 13. public String getEmail() { return email; } Override public String toString() { return "Team {teamId=" + teamId + ", name=" + name + ", firstName=" + firstName + ", lastName=" + lastName + ", phone=" + phone + ", email=" + email + "}"; } Override public boolean equals(Object obj) { if(obj == null) return false; else { if(!(obj instanceof Team)) return false; else { Team other = (Team)obj; if(this.teamId.equalsIgnoreCase(other.teamId) && this.name.equalsIgnoreCase(other.name) && this.firstName.equalsIgnoreCase(other.firstName) && this.lastName.equalsIgnoreCase(other.lastName) && this.phone.equalsIgnoreCase(other.phone) && this.email.equalsIgnoreCase(other.email)) return true; else return false; } } } /** * Checks if the email id contains "(at sign)". * Is yes returns true else returns false
  • 14. */ public boolean isValidEmail() { return this.email.contains("(at sign)"); } } public class Game { //Attributes private String gameID; private String homeTeamId; private String guestTeamId; private String gameDate; private int homeTeamScore; private int guestTeamScore; /** * Constructor * param gameID * param homeTeamId * param guestTeamId * param gameDate * param homeTeamScore * param guestTeamScore */ public Game(String gameID, String homeTeamId, String guestTeamId, String gameDate, int homeTeamScore, int guestTeamScore) { this.gameID = gameID; this.homeTeamId = homeTeamId; this.guestTeamId = guestTeamId; this.gameDate = gameDate; this.homeTeamScore = homeTeamScore; this.guestTeamScore = guestTeamScore; } /** * return the gameID */
  • 15. public String getGameID() { return gameID; } /** * return the homeTeamId */ public String getHomeTeamId() { return homeTeamId; } /** * return the guestTeamId */ public String getGuestTeamId() { return guestTeamId; } /** * return the gameDate */ public String getGameDate() { return gameDate; } /** * return the homeTeamScore */ public int getHomeTeamScore() { return homeTeamScore; } /** * return the guestTeamScore */ public int getGuestTeamScore() { return guestTeamScore; } Override public String toString() { return "Game {gameID=" + gameID + ", homeTeamId=" + homeTeamId + ",
  • 16. guestTeamId=" + guestTeamId + ", gameDate=" + gameDate + ", homeTeamScore=" + homeTeamScore + ", guestTeamScore=" + guestTeamScore + "}"; } Override public boolean equals(Object obj) { if(obj == null) return false; else { if(!(obj instanceof Game)) return false; else { Game other = (Game)obj; if(this.gameID.equalsIgnoreCase(other.gameID) && this.homeTeamId.equalsIgnoreCase(other.homeTeamId) && this.guestTeamId.equalsIgnoreCase(other.guestTeamId) && this.gameDate.equalsIgnoreCase(other.gameDate) && (this.homeTeamScore == other.homeTeamScore) && (this.guestTeamScore == other.guestTeamScore)) return true; else return false; } } } /** * Checks if the game date is between 20160101 and 20160531 * If yes return true or return false */ public boolean isValidDate() { int date = Integer.parseInt(gameDate); return ((20160101 <= date) && (date <= 20160531)); }
  • 17. } import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class Test { /** * Creates a Team object with the parameter passed and returns it * param teamId * param name * param firstName * param lastName * param phone * param email * return */ public static Team setTeamAttribute(String teamId, String name, String firstName, String lastName, String phone, String email) { return new Team(teamId, name, firstName, lastName, phone, email); } /** * Creates a Game object with the parameter passed and returns it * param gameID * param homeTeamId * param guestTeamId * param gameDate * param homeTeamScore * param guestTeamScore * return */ public static Game setGameAttribute(String gameID, String homeTeamId, String guestTeamId, String gameDate, int homeTeamScore, int guestTeamScore) { return new Game(gameID, homeTeamId, guestTeamId, gameDate, homeTeamScore, guestTeamScore); }
  • 18. public static void main(String[] args) { //Input file final String INPUT_FILENAME = "input/hw1input.txt"; //Test 1a System.out.println("RUNNING TEST 1a"); Team team1 = new Team("1", "Team1", "Ann", "Matt", "123456", "abcxyz.com"); System.out.println(team1); //Test 1b System.out.println(); System.out.println("RUNNING TEST 1b"); Game game1 = new Game("101", "Home Team", "Guest Team", "20160303", 12, 18); System.out.println(game1); //Open input file Scanner input = null; Team team2 = null; Game game2 = null; try { input = new Scanner(new File(INPUT_FILENAME)); //Read first line String[] inputDtls = input.nextLine().split(","); //Test 2a if(inputDtls[0].equalsIgnoreCase("TEAM")) { System.out.println(); System.out.println("RUNNING TEST 2a"); team2 = setTeamAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], inputDtls[5], inputDtls[6]); if(!team2.isValidEmail()) System.err.println("ERROR: Invalid email address. Is missing (at sign): " + team2.getEmail());
  • 19. //Display team1 attributes System.out.println(team2.getTeamId()); System.out.println(team2.getName()); System.out.println(team2.getFirstName()); System.out.println(team2.getLastName()); System.out.println(team2.getPhone()); System.out.println(team2.getEmail()); } //Read second line inputDtls = input.nextLine().split(","); //Test 2b if(inputDtls[0].equalsIgnoreCase("GAME")) { System.out.println(); System.out.println("RUNNING TEST 2b"); game2 = setGameAttribute(inputDtls[1], inputDtls[2], inputDtls[3], inputDtls[4], Integer.parseInt(inputDtls[5]), Integer.parseInt(inputDtls[6])); if(!game2.isValidDate()) System.err.println("ERROR: Invalid game date: " + game2.getGameDate()); //Display team attributes System.out.println(game2.getGameID()); System.out.println(game2.getHomeTeamId()); System.out.println(game2.getGuestTeamId()); System.out.println(game2.getGameDate()); System.out.println(game2.getHomeTeamScore()); System.out.println(game2.getGuestTeamScore()); } } catch(FileNotFoundException fnfe) { System.err.println("Data file not found"); } finally { //Close file if(input != null) input.close();
  • 20. } //Test 3a System.out.println(); System.out.println("RUNNING TEST 3a"); System.out.println("TEAM 1 : " + team1); System.out.println("TEAM 2 : " + team2); if(team1.equals(team2)) System.out.println("The two teams are same"); else System.out.println("The two teams not are same"); //Test 3b System.out.println(); System.out.println("RUNNING TEST 3b"); System.out.println("GAME 1 : " + game1); System.out.println("GAME 2 : " + game2); if(game1.equals(game2)) System.out.println("The two games are same"); else System.out.println("The two games not are same"); } } SAMPLE OUTPUT: RUNNING TEST 1a Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456, email=abcxyz.com} RUNNING TEST 1b Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team, gameDate=20160303, homeTeamScore=12, guestTeamScore=18} RUNNING TEST 2a ERROR: Invalid email address. Is missing (at sign): roadrunner#gmail.com 1 Road Runner David Brown
  • 21. 303-123-4567 roadrunner#gmail.com RUNNING TEST 2b ERROR: Invalid game date: 20150105 101 1 2 20150105 4 3 RUNNING TEST 3a TEAM 1 : Team {teamId=1, name=Team1, firstName=Ann, lastName=Matt, phone=123456, email=abcxyz.com} TEAM 2 : Team {teamId=1, name=Road Runner, firstName=David, lastName=Brown, phone=303-123-4567, email=roadrunner#gmail.com} The two teams not are same RUNNING TEST 3b GAME 1 : Game {gameID=101, homeTeamId=Home Team, guestTeamId=Guest Team, gameDate=20160303, homeTeamScore=12, guestTeamScore=18} GAME 2 : Game {gameID=101, homeTeamId=1, guestTeamId=2, gameDate=20150105, homeTeamScore=4, guestTeamScore=3} The two games not are same