SlideShare a Scribd company logo
1 of 20
Download to read offline
You will write a multi-interface version of the well-known concentration game: 1. The game
displays a grid of upper-case letters, with each letter appearing twice. 2. A player has a few
seconds to memorize the letters before they disappear. 3. The player then has to remember where
each pair was located.
line, then MultiConcentration starts with the text interface.
First the new game display will show the user the pairs he/she must guess, in a format similar to
the following example for size = 6
D H B C M I
H G K K A R
C N R E O E
Q O A Q L F
L F J P B G
P D N M I J
Memorize the above grid!
Note that the new game display uses pairs of distinct single uppercase capital letters distributed
at random on a square grid, starting at A and continuing until the grid is full.
This new game display shows for 10 seconds, after which it scrolls out of view. (To scroll it just
write about 25 newlines.) Then the standard game display appears.
The standard game display will look like the following example for size = 6
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
21 32 33 34 35 36
Enter a pair of numbers, or "R" to reset, or "Q" to quit:
reset, or "Q" to quit:
If the player makes an invalid entry (e.g. numbers out of range, number already guessed, no
blank separator, etc.) then a "please reenter" message is printed and the same display is shown
again.
If the player makes a bad guess, then a "Sorry..." message is printed and the same display is
shown again.
If the player enters an "R" for reset, then we start over, that is, the computer calculates a new
set of pairs and shows the new game display again.
If the player enters a "Q" for quit, then the game prints a "Game Over" message and ends.
3.4 Graphic Game Interface
If the player used the "-g" flag on the startup command line then MultiConcentration starts up
with the graphic interface.
You may design the graphic interface as you choose, as long as you use Swing and preserve the
steps in the game as described in the previous section.
One possible graphic interface is shown in Figure 1. In this design the new game display and the
standard game display have been replaced by a grid of buttons. Instead of entering pairs of
numbers, the player clicks on two of the buttons. The "reset" and "quit" commands are given
using a menu. Letters that have been correctly guessed are shown with a pink background color.
Messages to the player are shown in a text area under the grid.
4 GENERAL REQUIREMENTS
4.1 Design Requirements
Design your program with GUI classes, a main class, and Application Logic / Data classes as
described in my overheads on Design for Testability.
Do not use a package statement; name the main class MultiConcentration. (Otherwise the
startup command given in 3.1 would not work.)
You should have at least 5 classes, and not one of them should have more than 40% of the code.
Solution
import java.io.OutputStream;
import java.io.PrintStream;
public class MultiConcentration {
public static boolean gameTestModeEnabled = false;
private static boolean textBasedGame = false;
private static int gridSize = -1;
public static final int LOW_GRID = 2;
public static final int HI_GRID = 7;
private static void usage() {
System.out
.println("Usage: java [-ea] MultiConcentration [-g|-t] gridSize");
System.out.println("-ea for enabling assertions");
System.out.println("-g for a GUI interface");
System.out.println("-t for a text interface");
System.out
.printf("gridSize is the number of rows or columns (must be %d to %d) ",
LOW_GRID, HI_GRID);
}
private static boolean validateArguments(String[] args) {
// check for test mode
if (args.length == 1) {
if (args[0].equals("-TEST_MODE")) {
gameTestModeEnabled = true;
return true; // All good
}
}
// check for input arguments
if (args.length < 2) {
System.err.println("Error: Not enough arguments given.");
// not enough args given
return false;
} else {
if (!(args[0].equals("-t") || args[0].equals("-g"))) {
System.err.println("Error: First argument is invalid.");
// mistake in first argument
return false;
}
// set textBasedGame
if (args[0].equals("-t"))
textBasedGame = true;
else
textBasedGame = false;
// check second argument
try {
gridSize = Integer.parseInt(args[1]);
} catch (NumberFormatException e) {
System.err.println("Error: Second argument is not a number.");
return false; // not integer
}
// Test grid size
if (!(gridSize >= LOW_GRID && gridSize <= HI_GRID)) {
System.err.println("Error: Second argument is not in "
+ LOW_GRID + " <= x <= " + HI_GRID + ".");
return false;
}
return true; // All good
}
}
private static void logMsg(boolean passed, int testCnt) {
if (!passed)
System.out.printf("MultiConcentration.validateArguments MC_"
+ "%03d failed ", testCnt);
else
System.out.printf("MultiConcentration.validateArguments MC_"
+ "%03d passed ", testCnt);
}
private static boolean classTest() {
boolean allPassed = true;
int tstCnt = 1;
String[] testArgs = { "" };
boolean result = validateArguments(testArgs);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_002 - Test for missing flag character or incorrect flag
// character.
String[] testArgs2 = { "-a", "" };
result = validateArguments(testArgs2);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_003 - Tests gridSize argument that is less than
// minimum.
testArgs2[0] = "-t";
testArgs2[1] = "1";
result = validateArguments(testArgs2);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_004 - Tests gridSize argument within range, between 2
// and 7 with text GUI.
testArgs2[0] = "-t";
testArgs2[1] = "4";
result = validateArguments(testArgs2);
if (!result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_005 - Tests gridSize argument within range, between 2
// and 7 with graphic GUI.
testArgs2[0] = "-g";
testArgs2[1] = "4";
result = validateArguments(testArgs2);
if (!result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_006 - Tests gridSize argument that is greater than
// maximum.
testArgs2[0] = "-t";
testArgs2[1] = "8";
result = validateArguments(testArgs2);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
// Test Case: MC_007 - Test for extra flag characters.
testArgs2[0] = "-tag";
result = validateArguments(testArgs2);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
String testArgs3[] = { "-t", "a", "5" };
result = validateArguments(testArgs3);
if (result)
allPassed = false;
logMsg(allPassed, tstCnt++);
allPassed &= true;
return allPassed;
}
private static boolean integrationTests() {
return true;
}
private static boolean systemTests() {
return true;
}
private static void startClassTests() {
boolean overAllTestResult = true;
/** Start unit tests */
// Test GameConfiguration
overAllTestResult &= GameConfiguration.classTest();
// Test GameController
overAllTestResult &= GameController.classTest();
// Test GameGenerator
overAllTestResult &= GameGenerator.classTest();
// Test GraphicUI
overAllTestResult &= GraphicUI.classTest();
// Test MultiConcentration
overAllTestResult &= MultiConcentration.classTest();
// Test TextUI
overAllTestResult &= TextUI.classTest();
/** Start integration tests */
overAllTestResult &= MultiConcentration.integrationTests();
/** Start system tests */
overAllTestResult &= MultiConcentration.systemTests();
if (overAllTestResult)
System.out.println("All tests passed");
else
System.out.println("Some tests failed");
}
public static void main(String[] args) {
// check arguments
if (!validateArguments(args)) {
usage();
System.exit(1);
}
// Test Mode?
if (gameTestModeEnabled) {
// Error if unit tests are run without assertions enabled
boolean assertsEnabled = false;
assert assertsEnabled = true; // intentional side effect
if (!assertsEnabled)
throw new RuntimeException(
"Assertions must be enabled for unit tests");
// disable error output
System.setErr(new PrintStream(new OutputStream() {
public void write(int b) {
}
}));
startClassTests();
} else {
// init and start game
GameController game = new GameController(gridSize, textBasedGame);
game.startGame();
}
}
}
GameConfiguration.java
import java.util.Arrays;
public class GameConfiguration {
private char gameMatrix[];
/** currentMatches represents the found current matches of the user */
private boolean currentMatches[];
/** gridSize is the size of the game */
private int gridSize;
public GameConfiguration(int gridSize, char gameMatrix[])
throws NullPointerException, IllegalArgumentException {
if (gameMatrix == null)
throw new NullPointerException("gameMatrix is null");
if (!(gridSize >= MultiConcentration.LOW_GRID && gridSize <=
MultiConcentration.HI_GRID))
throw new IllegalArgumentException("Game size out of range");
if (gameMatrix.length != gridSize * gridSize)
throw new IllegalArgumentException("Game matrix dimension error");
this.gridSize = gridSize;
this.gameMatrix = gameMatrix;
currentMatches = new boolean[gameMatrix.length];
for (int i = 0; i < currentMatches.length; i++) {
currentMatches[i] = false;
}
}
public boolean isValidFieldNumber(int number) {
// out of range?
if (number < 1 || number > gridSize * gridSize) {
return false;
}
// already chosen?
if (currentMatches[number - 1])
return false;
return true;
}
public boolean trySetMatch(int matchPosition1, int matchPosition2)
throws IllegalArgumentException {
if (matchPosition1 <= 0 || matchPosition1 > gameMatrix.length)
throw new IllegalArgumentException("matchpos 1 out of range");
else if (matchPosition2 <= 0 || matchPosition2 > gameMatrix.length)
throw new IllegalArgumentException("matchpos 1 out of range");
if (gameMatrix[matchPosition1 - 1] == gameMatrix[matchPosition2 - 1]) {
currentMatches[matchPosition1 - 1] = true;
currentMatches[matchPosition2 - 1] = true;
return true;
} else {
return false;
}
}
public boolean isGameFinished() {
boolean retVal = false;
// Base number of correct answers on length
int numCorrectNeeded = currentMatches.length;
int numCorrectCnt = 0;
// If grid is an odd number of elements, all but one
// correct count indicates game over
if (0 == ((numCorrectNeeded + 1) % 2)) {
numCorrectNeeded--;
}
// count number of matches
for (int i = 0; i < currentMatches.length; i++) {
if (currentMatches[i])
numCorrectCnt++;
}
// Determine if enough matches are true
if (numCorrectCnt == numCorrectNeeded)
retVal = true;
return retVal;
}
/**
* @return the gameMatrix
*/
public char[] getGameMatrix() {
return gameMatrix;
}
/**
* @return the currentMatches
*/
public boolean[] getCurrentMatches() {
return currentMatches;
}
/**
* @return the gridSize
*/
public int getGridSize() {
return gridSize;
}
private static void logMsg(boolean passed, String methodName, int testCnt,
char testIDPostfix) {
if (!passed)
System.out.printf("GameConfiguration." + methodName + " GC"
+ testIDPostfix + "_%03d failed ", testCnt);
else
System.out.printf("GameConfiguration." + methodName + " GC"
+ testIDPostfix + "_%03d passed ", testCnt);
}
private static boolean constructorTest() {
GameConfiguration config;
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
int GS1 = 1; // {gridSize: gridSize < 2}
int GS2 = 2; // {gridSize: 2 <= gridSize <= 7}
int GS3 = 8; // {gridSize: gridSize > 7}
int GS[] = { GS1, GS2, GS3 };
char GMN1[] = null; // {gameMatrix: gameMatrix == null}
char GMN2[] = { 'A', 'A', 'B', 'B' }; // {gameMatrix: gameMatrix !=
// null}
char GMN[][] = { GMN1, GMN2 };
// GML1 = {gameMatrix: gameMatrix.length() != gridSize^2}
// GML2 = {gameMatrix: gameMatrix.length() == gridSize^2}
char GMC1[] = { 'a', 'A', 'B', 'B' }; // {gameMatrix: gameMatrix[X] is
// no capital char}
char GMC2[] = GMN2; // {gameMatrix: gameMatrix[X] is a capital char}
char GMC[][] = { GMC1, GMC2 };
char GMM1[] = GMN2; // {gameMatrix: For every X, there is only one or no
// Y for: gameMatrix[X] = gameMatrix[Y]}
char GMM2[] = { 'A', 'A', 'A', 'B' }; // {gameMatrix: There is a X with
// more than one Y for:
// gameMatrix[X] =
// gameMatrix[Y]}
char GMMC[][] = { GMM1, GMM2 };
/** Test case 1 */
passed = true;
try {
config = new GameConfiguration(GS1, GMN2);
passed = false;
} catch (IllegalArgumentException e) {
}
try {
config = new GameConfiguration(GS2 + 1, GMN2);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
/** Test case 2 */
passed = true;
try {
config = new GameConfiguration(GS2, GMN1);
passed = false;
} catch (NullPointerException e) {
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
/** Test case 3 */
passed = true;
try {
config = new GameConfiguration(GS3, GMN2);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
/** Test case 4 */
passed = true;
try {
config = new GameConfiguration(GS2, GMC1);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
/** Test case 5 */
passed = true;
try {
config = new GameConfiguration(GS2, GMM2);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
/** Test case 6 */
passed = true;
config = new GameConfiguration(GS2, GMM1);
// check if object is initialized right
if (config.getCurrentMatches().length != GS2 * GS2)
passed = false;
else {
for (boolean currMatch : config.getCurrentMatches()) {
if (currMatch) {
passed = false;
break;
}
}
}
// print message and prepare for next test
logMsg(passed, "GameConfiguration", testCount, 'C');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean isValidFieldNumberTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
int N1 = -1; // {number: number < 1}
int N2 = 2; // {number: 1 <= number <= gridSize * gridSize}
int N3 = 1000; // {number: number > gridSize * gridSize}
// CM1 = {currentMatches: currentMatches[number] == true}
// CM2 = {currentMatches: currentMatches[number] == false}
/** init test data */
char matrix[] = { 'A', 'A', 'B', 'B' };
GameConfiguration config = new GameConfiguration(2, matrix);
config.trySetMatch(1, 2);
/** Test case 1 */
passed = true;
if (config.isValidFieldNumber(N1))
passed = false;
if (config.isValidFieldNumber(N3))
passed = false;
// print message and prepare for next test
logMsg(passed, "isValidFieldNumber", testCount, 'F');
overallPassed &= passed;
testCount++;
/** Test case 2 */
passed = true;
if (config.isValidFieldNumber(N2 + 1) == false)
passed = false;
// print message and prepare for next test
logMsg(passed, "isValidFieldNumber", testCount, 'F');
overallPassed &= passed;
testCount++;
/** Test case 3 */
passed = true;
if (config.isValidFieldNumber(N2) == true)
passed = false;
// print message and prepare for next test
logMsg(passed, "isValidFieldNumber", testCount, 'F');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean trySetMatchTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
int M1_1 = -1; // {matchPosition1: matchPosition1 < 1}
int M1_2 = 1; // {matchPosition1: 1 <= matchPosition1 <= gridSize *
// gridSize}
int M1_3 = 5; // {matchPosition1: matchPosition1 > gridSize * gridSize}
int M2_1 = -1; // {matchPosition2: matchPosition2 < 1}
int M2_2 = 2; // {matchPosition2: 1 <= matchPosition2 <= gridSize *
// gridSize}
int M2_3 = 5; // {matchPosition2: matchPosition2 > gridSize * gridSize}
// MM1 = {gameMatrix: gameMatrix [matchPosition1 - 1] ==
// gameMatrix[matchPosition2 - 1]}
// MM2 = {gameMatrix: gameMatrix [matchPosition1 - 1] !=
// gameMatrix[matchPosition2 - 1]}
/** init test data */
char matrix[] = { 'A', 'A', 'B', 'B' };
GameConfiguration config = new GameConfiguration(2, matrix);
/** Test case 1 */
passed = true;
try {
config.trySetMatch(M1_1, M2_2);
passed = false;
} catch (IllegalArgumentException e) {
}
try {
config.trySetMatch(M1_3, M2_2);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "trySetMatch", testCount, 'M');
overallPassed &= passed;
testCount++;
/** Test case 2 */
passed = true;
try {
config.trySetMatch(M1_2, M2_1);
passed = false;
} catch (IllegalArgumentException e) {
}
try {
config.trySetMatch(M1_2, M2_3);
passed = false;
} catch (IllegalArgumentException e) {
}
// print message and prepare for next test
logMsg(passed, "trySetMatch", testCount, 'M');
overallPassed &= passed;
testCount++;
/** Test case 3 */
passed = true;
if (config.trySetMatch(M1_2, M2_2) == false)
passed = false;
// print message and prepare for next test
logMsg(passed, "trySetMatch", testCount, 'M');
overallPassed &= passed;
testCount++;
/** Test case 4 */
passed = true;
if (config.trySetMatch(M1_2, M2_2 + 1) == true)
passed = false;
// print message and prepare for next test
logMsg(passed, "trySetMatch", testCount, 'M');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean isGameFinishedTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
/** init test data */
char matrixEven[] = { 'A', 'A', 'B', 'B' };
GameConfiguration configEven = new GameConfiguration(2, matrixEven);
char matrixOdd[] = { 'A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E' };
GameConfiguration configOdd = new GameConfiguration(3, matrixOdd);
/** Test case 1 */
passed = true;
if (configEven.isGameFinished() || configOdd.isGameFinished())
passed = false;
// print message and prepare for next test
logMsg(passed, "isGameFinished", testCount, 'G');
overallPassed &= passed;
testCount++;
/** Test case 2 */
configEven.trySetMatch(1, 2);
configEven.trySetMatch(3, 4);
passed = true;
if (!configEven.isGameFinished())
passed = false;
// print message and prepare for next test
logMsg(passed, "isGameFinished", testCount, 'G');
overallPassed &= passed;
testCount++;
/** Test case 3 */
configOdd.trySetMatch(1, 2);
configOdd.trySetMatch(3, 4);
configOdd.trySetMatch(5, 6);
configOdd.trySetMatch(7, 8);
passed = true;
if (!configEven.isGameFinished())
passed = false;
// print message and prepare for next test
logMsg(passed, "isGameFinished", testCount, 'G');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean getGameMatrixTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
/** init test data */
char matrixEven[] = { 'A', 'A', 'B', 'B' };
GameConfiguration configEven = new GameConfiguration(2, matrixEven);
/** Test case 1 */
passed = true;
if (!Arrays.equals(configEven.getGameMatrix(), matrixEven))
passed = false;
// print message and prepare for next test
logMsg(passed, "getGameMatrix", testCount, 'A');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean getCurrentMatchesTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
/** init test data */
char matrixEven[] = { 'A', 'A', 'B', 'B' };
GameConfiguration configEven = new GameConfiguration(2, matrixEven);
/** Test case 1 */
passed = true;
boolean matchesMatr[] = { false, false, false, false };
if (!Arrays.equals(configEven.getCurrentMatches(), matchesMatr))
passed = false;
// print message and prepare for next test
logMsg(passed, "getCurrentMatches", testCount, 'S');
overallPassed &= passed;
testCount++;
/** Test case 2 */
passed = true;
matchesMatr[0] = true;
matchesMatr[1] = true;
configEven.trySetMatch(1, 2);
if (!Arrays.equals(configEven.getCurrentMatches(), matchesMatr))
passed = false;
// print message and prepare for next test
logMsg(passed, "getCurrentMatches", testCount, 'S');
overallPassed &= passed;
testCount++;
return overallPassed;
}
private static boolean getGridSizeTest() {
int testCount = 1;
boolean passed = true;
boolean overallPassed = true;
/** init test data */
char matrixEven[] = { 'A', 'A', 'B', 'B' };
GameConfiguration configEven = new GameConfiguration(2, matrixEven);
/** Test case 1 */
passed = true;
if (!(configEven.getGridSize() == 2))
passed = false;
// print message and prepare for next test
logMsg(passed, "getGridSize", testCount, 'N');
overallPassed &= passed;
testCount++;
return overallPassed;
}
public static boolean classTest() {
boolean retVal = true;
// do constructor test
retVal &= constructorTest();
// do isValidFieldNumber test
retVal &= isValidFieldNumberTest();
// do trySetMatch test
retVal &= trySetMatchTest();
// do isGameFinished test
retVal &= isGameFinishedTest();
// do getGameMatrix test
retVal &= getGameMatrixTest();
// do getCurrentMatches test
retVal &= getCurrentMatchesTest();
// do getGridSize test
retVal &= getGridSizeTest();
return retVal;
}
}
note: due to limited characters i cant able to upload all files

More Related Content

Similar to You will write a multi-interface version of the well-known concentra.pdf

OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IAbdul Rahman Sherzad
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptMahyuddin8
 
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
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05HUST
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3Dillon Lee
 
ma project
ma projectma project
ma projectAisu
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdfaquacareser
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdfaquapariwar
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingPathomchon Sriwilairit
 
TASK #1In the domain class you will create a loop that will prompt.pdf
TASK #1In the domain class you will create a loop that will prompt.pdfTASK #1In the domain class you will create a loop that will prompt.pdf
TASK #1In the domain class you will create a loop that will prompt.pdfindiaartz
 
Construct a java method.   This method chooses the number of sti.pdf
Construct a java method.    This method chooses the number of sti.pdfConstruct a java method.    This method chooses the number of sti.pdf
Construct a java method.   This method chooses the number of sti.pdfarihantmobilepoint15
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programingKrishna Agarwal
 

Similar to You will write a multi-interface version of the well-known concentra.pdf (20)

PSI 3 Integration
PSI 3 IntegrationPSI 3 Integration
PSI 3 Integration
 
OXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART IOXUS20 JAVA Programming Questions and Answers PART I
OXUS20 JAVA Programming Questions and Answers PART I
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.ppt
 
Practice
PracticePractice
Practice
 
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
 
Ip project
Ip projectIp project
Ip project
 
Csphtp1 05
Csphtp1 05Csphtp1 05
Csphtp1 05
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3
 
39927902 c-labmanual
39927902 c-labmanual39927902 c-labmanual
39927902 c-labmanual
 
39927902 c-labmanual
39927902 c-labmanual39927902 c-labmanual
39927902 c-labmanual
 
Java file
Java fileJava file
Java file
 
Java file
Java fileJava file
Java file
 
Python for Beginners(v2)
Python for Beginners(v2)Python for Beginners(v2)
Python for Beginners(v2)
 
ma project
ma projectma project
ma project
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf
 
#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf#In this project you will write a program play TicTacToe #using tw.pdf
#In this project you will write a program play TicTacToe #using tw.pdf
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java Programming
 
TASK #1In the domain class you will create a loop that will prompt.pdf
TASK #1In the domain class you will create a loop that will prompt.pdfTASK #1In the domain class you will create a loop that will prompt.pdf
TASK #1In the domain class you will create a loop that will prompt.pdf
 
Construct a java method.   This method chooses the number of sti.pdf
Construct a java method.    This method chooses the number of sti.pdfConstruct a java method.    This method chooses the number of sti.pdf
Construct a java method.   This method chooses the number of sti.pdf
 
Tic tac toe c++ programing
Tic tac toe c++ programingTic tac toe c++ programing
Tic tac toe c++ programing
 

More from FashionColZone

In order to determine the overall chromosome map for E. coli, four Hf.pdf
In order to determine the overall chromosome map for E. coli, four Hf.pdfIn order to determine the overall chromosome map for E. coli, four Hf.pdf
In order to determine the overall chromosome map for E. coli, four Hf.pdfFashionColZone
 
In a fantasy world where organisms can augment diffusion by using ma.pdf
In a fantasy world where organisms can augment diffusion by using ma.pdfIn a fantasy world where organisms can augment diffusion by using ma.pdf
In a fantasy world where organisms can augment diffusion by using ma.pdfFashionColZone
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfFashionColZone
 
Explain how consumer judges the quality of service (Including price .pdf
Explain how consumer judges the quality of service (Including price .pdfExplain how consumer judges the quality of service (Including price .pdf
Explain how consumer judges the quality of service (Including price .pdfFashionColZone
 
Early Americans did not practice equality according to today’s defin.pdf
Early Americans did not practice equality according to today’s defin.pdfEarly Americans did not practice equality according to today’s defin.pdf
Early Americans did not practice equality according to today’s defin.pdfFashionColZone
 
Do you think that the level of prosperity of a given society influen.pdf
Do you think that the level of prosperity of a given society influen.pdfDo you think that the level of prosperity of a given society influen.pdf
Do you think that the level of prosperity of a given society influen.pdfFashionColZone
 
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdf
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdfDesign a circuit that detect the sequence 0110. Draw the Moore sta.pdf
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdfFashionColZone
 
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdf
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdfCyanide is a potent toxin that can kill a human in minutes. It funct.pdf
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdfFashionColZone
 
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdfA Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdfFashionColZone
 
Assume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdfAssume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdfFashionColZone
 
Briefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdfBriefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdfFashionColZone
 
A satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdfA satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdfFashionColZone
 
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdfFashionColZone
 
You are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdfYou are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdfFashionColZone
 
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdf
Why animals migrate  I need 5 new ideas (exclude  reproduction , s.pdfWhy animals migrate  I need 5 new ideas (exclude  reproduction , s.pdf
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdfFashionColZone
 
Which of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdfWhich of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdfFashionColZone
 
What are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdfWhat are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdfFashionColZone
 
TYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdfTYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdfFashionColZone
 
The total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdfThe total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdfFashionColZone
 
1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdfFashionColZone
 

More from FashionColZone (20)

In order to determine the overall chromosome map for E. coli, four Hf.pdf
In order to determine the overall chromosome map for E. coli, four Hf.pdfIn order to determine the overall chromosome map for E. coli, four Hf.pdf
In order to determine the overall chromosome map for E. coli, four Hf.pdf
 
In a fantasy world where organisms can augment diffusion by using ma.pdf
In a fantasy world where organisms can augment diffusion by using ma.pdfIn a fantasy world where organisms can augment diffusion by using ma.pdf
In a fantasy world where organisms can augment diffusion by using ma.pdf
 
Hello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdfHello, I need some assistance in writing a java program THAT MUST US.pdf
Hello, I need some assistance in writing a java program THAT MUST US.pdf
 
Explain how consumer judges the quality of service (Including price .pdf
Explain how consumer judges the quality of service (Including price .pdfExplain how consumer judges the quality of service (Including price .pdf
Explain how consumer judges the quality of service (Including price .pdf
 
Early Americans did not practice equality according to today’s defin.pdf
Early Americans did not practice equality according to today’s defin.pdfEarly Americans did not practice equality according to today’s defin.pdf
Early Americans did not practice equality according to today’s defin.pdf
 
Do you think that the level of prosperity of a given society influen.pdf
Do you think that the level of prosperity of a given society influen.pdfDo you think that the level of prosperity of a given society influen.pdf
Do you think that the level of prosperity of a given society influen.pdf
 
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdf
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdfDesign a circuit that detect the sequence 0110. Draw the Moore sta.pdf
Design a circuit that detect the sequence 0110. Draw the Moore sta.pdf
 
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdf
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdfCyanide is a potent toxin that can kill a human in minutes. It funct.pdf
Cyanide is a potent toxin that can kill a human in minutes. It funct.pdf
 
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdfA Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
A Fullerene is a 3-regular planar graph with faces of degree 5 and 6.pdf
 
Assume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdfAssume that the paired date came from a population that is normally .pdf
Assume that the paired date came from a population that is normally .pdf
 
Briefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdfBriefly describe three processing schema used in cochlear implants..pdf
Briefly describe three processing schema used in cochlear implants..pdf
 
A satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdfA satellite moves in a circular orbit around Earth at a speed of 470.pdf
A satellite moves in a circular orbit around Earth at a speed of 470.pdf
 
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
7. What do we mean by “spreading signal”in CDMA systems16. Name a.pdf
 
You are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdfYou are interested in using the plasmid pGEE as a vector for incorpor.pdf
You are interested in using the plasmid pGEE as a vector for incorpor.pdf
 
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdf
Why animals migrate  I need 5 new ideas (exclude  reproduction , s.pdfWhy animals migrate  I need 5 new ideas (exclude  reproduction , s.pdf
Why animals migrate I need 5 new ideas (exclude reproduction , s.pdf
 
Which of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdfWhich of the following characteristics of the fetus distinguishes it.pdf
Which of the following characteristics of the fetus distinguishes it.pdf
 
What are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdfWhat are the major sources of cash (inflows) in a statement of cash .pdf
What are the major sources of cash (inflows) in a statement of cash .pdf
 
TYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdfTYPES OF AUDIT1. Is there an internal audit function within your o.pdf
TYPES OF AUDIT1. Is there an internal audit function within your o.pdf
 
The total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdfThe total exergy is an extensive property of a system. True or False.pdf
The total exergy is an extensive property of a system. True or False.pdf
 
1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf1.Define culture. How can culture be conceptionalized Your resp.pdf
1.Define culture. How can culture be conceptionalized Your resp.pdf
 

Recently uploaded

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 

Recently uploaded (20)

Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 

You will write a multi-interface version of the well-known concentra.pdf

  • 1. You will write a multi-interface version of the well-known concentration game: 1. The game displays a grid of upper-case letters, with each letter appearing twice. 2. A player has a few seconds to memorize the letters before they disappear. 3. The player then has to remember where each pair was located. line, then MultiConcentration starts with the text interface. First the new game display will show the user the pairs he/she must guess, in a format similar to the following example for size = 6 D H B C M I H G K K A R C N R E O E Q O A Q L F L F J P B G P D N M I J Memorize the above grid! Note that the new game display uses pairs of distinct single uppercase capital letters distributed at random on a square grid, starting at A and continuing until the grid is full. This new game display shows for 10 seconds, after which it scrolls out of view. (To scroll it just write about 25 newlines.) Then the standard game display appears. The standard game display will look like the following example for size = 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 21 32 33 34 35 36 Enter a pair of numbers, or "R" to reset, or "Q" to quit: reset, or "Q" to quit: If the player makes an invalid entry (e.g. numbers out of range, number already guessed, no blank separator, etc.) then a "please reenter" message is printed and the same display is shown again. If the player makes a bad guess, then a "Sorry..." message is printed and the same display is shown again. If the player enters an "R" for reset, then we start over, that is, the computer calculates a new set of pairs and shows the new game display again. If the player enters a "Q" for quit, then the game prints a "Game Over" message and ends.
  • 2. 3.4 Graphic Game Interface If the player used the "-g" flag on the startup command line then MultiConcentration starts up with the graphic interface. You may design the graphic interface as you choose, as long as you use Swing and preserve the steps in the game as described in the previous section. One possible graphic interface is shown in Figure 1. In this design the new game display and the standard game display have been replaced by a grid of buttons. Instead of entering pairs of numbers, the player clicks on two of the buttons. The "reset" and "quit" commands are given using a menu. Letters that have been correctly guessed are shown with a pink background color. Messages to the player are shown in a text area under the grid. 4 GENERAL REQUIREMENTS 4.1 Design Requirements Design your program with GUI classes, a main class, and Application Logic / Data classes as described in my overheads on Design for Testability. Do not use a package statement; name the main class MultiConcentration. (Otherwise the startup command given in 3.1 would not work.) You should have at least 5 classes, and not one of them should have more than 40% of the code. Solution import java.io.OutputStream; import java.io.PrintStream; public class MultiConcentration { public static boolean gameTestModeEnabled = false; private static boolean textBasedGame = false; private static int gridSize = -1; public static final int LOW_GRID = 2; public static final int HI_GRID = 7; private static void usage() { System.out .println("Usage: java [-ea] MultiConcentration [-g|-t] gridSize"); System.out.println("-ea for enabling assertions"); System.out.println("-g for a GUI interface"); System.out.println("-t for a text interface"); System.out
  • 3. .printf("gridSize is the number of rows or columns (must be %d to %d) ", LOW_GRID, HI_GRID); } private static boolean validateArguments(String[] args) { // check for test mode if (args.length == 1) { if (args[0].equals("-TEST_MODE")) { gameTestModeEnabled = true; return true; // All good } } // check for input arguments if (args.length < 2) { System.err.println("Error: Not enough arguments given."); // not enough args given return false; } else { if (!(args[0].equals("-t") || args[0].equals("-g"))) { System.err.println("Error: First argument is invalid."); // mistake in first argument return false; } // set textBasedGame if (args[0].equals("-t")) textBasedGame = true; else textBasedGame = false; // check second argument try { gridSize = Integer.parseInt(args[1]); } catch (NumberFormatException e) { System.err.println("Error: Second argument is not a number."); return false; // not integer } // Test grid size
  • 4. if (!(gridSize >= LOW_GRID && gridSize <= HI_GRID)) { System.err.println("Error: Second argument is not in " + LOW_GRID + " <= x <= " + HI_GRID + "."); return false; } return true; // All good } } private static void logMsg(boolean passed, int testCnt) { if (!passed) System.out.printf("MultiConcentration.validateArguments MC_" + "%03d failed ", testCnt); else System.out.printf("MultiConcentration.validateArguments MC_" + "%03d passed ", testCnt); } private static boolean classTest() { boolean allPassed = true; int tstCnt = 1; String[] testArgs = { "" }; boolean result = validateArguments(testArgs); if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_002 - Test for missing flag character or incorrect flag // character. String[] testArgs2 = { "-a", "" }; result = validateArguments(testArgs2); if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_003 - Tests gridSize argument that is less than // minimum. testArgs2[0] = "-t";
  • 5. testArgs2[1] = "1"; result = validateArguments(testArgs2); if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_004 - Tests gridSize argument within range, between 2 // and 7 with text GUI. testArgs2[0] = "-t"; testArgs2[1] = "4"; result = validateArguments(testArgs2); if (!result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_005 - Tests gridSize argument within range, between 2 // and 7 with graphic GUI. testArgs2[0] = "-g"; testArgs2[1] = "4"; result = validateArguments(testArgs2); if (!result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_006 - Tests gridSize argument that is greater than // maximum. testArgs2[0] = "-t"; testArgs2[1] = "8"; result = validateArguments(testArgs2); if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; // Test Case: MC_007 - Test for extra flag characters. testArgs2[0] = "-tag"; result = validateArguments(testArgs2);
  • 6. if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; String testArgs3[] = { "-t", "a", "5" }; result = validateArguments(testArgs3); if (result) allPassed = false; logMsg(allPassed, tstCnt++); allPassed &= true; return allPassed; } private static boolean integrationTests() { return true; } private static boolean systemTests() { return true; } private static void startClassTests() { boolean overAllTestResult = true; /** Start unit tests */ // Test GameConfiguration overAllTestResult &= GameConfiguration.classTest(); // Test GameController overAllTestResult &= GameController.classTest(); // Test GameGenerator overAllTestResult &= GameGenerator.classTest(); // Test GraphicUI overAllTestResult &= GraphicUI.classTest(); // Test MultiConcentration overAllTestResult &= MultiConcentration.classTest(); // Test TextUI overAllTestResult &= TextUI.classTest(); /** Start integration tests */ overAllTestResult &= MultiConcentration.integrationTests(); /** Start system tests */
  • 7. overAllTestResult &= MultiConcentration.systemTests(); if (overAllTestResult) System.out.println("All tests passed"); else System.out.println("Some tests failed"); } public static void main(String[] args) { // check arguments if (!validateArguments(args)) { usage(); System.exit(1); } // Test Mode? if (gameTestModeEnabled) { // Error if unit tests are run without assertions enabled boolean assertsEnabled = false; assert assertsEnabled = true; // intentional side effect if (!assertsEnabled) throw new RuntimeException( "Assertions must be enabled for unit tests"); // disable error output System.setErr(new PrintStream(new OutputStream() { public void write(int b) { } })); startClassTests(); } else { // init and start game GameController game = new GameController(gridSize, textBasedGame); game.startGame(); } } } GameConfiguration.java
  • 8. import java.util.Arrays; public class GameConfiguration { private char gameMatrix[]; /** currentMatches represents the found current matches of the user */ private boolean currentMatches[]; /** gridSize is the size of the game */ private int gridSize; public GameConfiguration(int gridSize, char gameMatrix[]) throws NullPointerException, IllegalArgumentException { if (gameMatrix == null) throw new NullPointerException("gameMatrix is null"); if (!(gridSize >= MultiConcentration.LOW_GRID && gridSize <= MultiConcentration.HI_GRID)) throw new IllegalArgumentException("Game size out of range"); if (gameMatrix.length != gridSize * gridSize) throw new IllegalArgumentException("Game matrix dimension error"); this.gridSize = gridSize; this.gameMatrix = gameMatrix; currentMatches = new boolean[gameMatrix.length]; for (int i = 0; i < currentMatches.length; i++) { currentMatches[i] = false; } } public boolean isValidFieldNumber(int number) { // out of range? if (number < 1 || number > gridSize * gridSize) { return false; } // already chosen? if (currentMatches[number - 1]) return false; return true; } public boolean trySetMatch(int matchPosition1, int matchPosition2) throws IllegalArgumentException { if (matchPosition1 <= 0 || matchPosition1 > gameMatrix.length)
  • 9. throw new IllegalArgumentException("matchpos 1 out of range"); else if (matchPosition2 <= 0 || matchPosition2 > gameMatrix.length) throw new IllegalArgumentException("matchpos 1 out of range"); if (gameMatrix[matchPosition1 - 1] == gameMatrix[matchPosition2 - 1]) { currentMatches[matchPosition1 - 1] = true; currentMatches[matchPosition2 - 1] = true; return true; } else { return false; } } public boolean isGameFinished() { boolean retVal = false; // Base number of correct answers on length int numCorrectNeeded = currentMatches.length; int numCorrectCnt = 0; // If grid is an odd number of elements, all but one // correct count indicates game over if (0 == ((numCorrectNeeded + 1) % 2)) { numCorrectNeeded--; } // count number of matches for (int i = 0; i < currentMatches.length; i++) { if (currentMatches[i]) numCorrectCnt++; } // Determine if enough matches are true if (numCorrectCnt == numCorrectNeeded) retVal = true; return retVal; } /** * @return the gameMatrix */ public char[] getGameMatrix() { return gameMatrix;
  • 10. } /** * @return the currentMatches */ public boolean[] getCurrentMatches() { return currentMatches; } /** * @return the gridSize */ public int getGridSize() { return gridSize; } private static void logMsg(boolean passed, String methodName, int testCnt, char testIDPostfix) { if (!passed) System.out.printf("GameConfiguration." + methodName + " GC" + testIDPostfix + "_%03d failed ", testCnt); else System.out.printf("GameConfiguration." + methodName + " GC" + testIDPostfix + "_%03d passed ", testCnt); } private static boolean constructorTest() { GameConfiguration config; int testCount = 1; boolean passed = true; boolean overallPassed = true; int GS1 = 1; // {gridSize: gridSize < 2} int GS2 = 2; // {gridSize: 2 <= gridSize <= 7} int GS3 = 8; // {gridSize: gridSize > 7} int GS[] = { GS1, GS2, GS3 }; char GMN1[] = null; // {gameMatrix: gameMatrix == null} char GMN2[] = { 'A', 'A', 'B', 'B' }; // {gameMatrix: gameMatrix != // null} char GMN[][] = { GMN1, GMN2 }; // GML1 = {gameMatrix: gameMatrix.length() != gridSize^2}
  • 11. // GML2 = {gameMatrix: gameMatrix.length() == gridSize^2} char GMC1[] = { 'a', 'A', 'B', 'B' }; // {gameMatrix: gameMatrix[X] is // no capital char} char GMC2[] = GMN2; // {gameMatrix: gameMatrix[X] is a capital char} char GMC[][] = { GMC1, GMC2 }; char GMM1[] = GMN2; // {gameMatrix: For every X, there is only one or no // Y for: gameMatrix[X] = gameMatrix[Y]} char GMM2[] = { 'A', 'A', 'A', 'B' }; // {gameMatrix: There is a X with // more than one Y for: // gameMatrix[X] = // gameMatrix[Y]} char GMMC[][] = { GMM1, GMM2 }; /** Test case 1 */ passed = true; try { config = new GameConfiguration(GS1, GMN2); passed = false; } catch (IllegalArgumentException e) { } try { config = new GameConfiguration(GS2 + 1, GMN2); passed = false; } catch (IllegalArgumentException e) { } // print message and prepare for next test logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++; /** Test case 2 */ passed = true; try { config = new GameConfiguration(GS2, GMN1); passed = false; } catch (NullPointerException e) { } // print message and prepare for next test
  • 12. logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++; /** Test case 3 */ passed = true; try { config = new GameConfiguration(GS3, GMN2); passed = false; } catch (IllegalArgumentException e) { } // print message and prepare for next test logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++; /** Test case 4 */ passed = true; try { config = new GameConfiguration(GS2, GMC1); passed = false; } catch (IllegalArgumentException e) { } // print message and prepare for next test logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++; /** Test case 5 */ passed = true; try { config = new GameConfiguration(GS2, GMM2); passed = false; } catch (IllegalArgumentException e) { } // print message and prepare for next test logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++;
  • 13. /** Test case 6 */ passed = true; config = new GameConfiguration(GS2, GMM1); // check if object is initialized right if (config.getCurrentMatches().length != GS2 * GS2) passed = false; else { for (boolean currMatch : config.getCurrentMatches()) { if (currMatch) { passed = false; break; } } } // print message and prepare for next test logMsg(passed, "GameConfiguration", testCount, 'C'); overallPassed &= passed; testCount++; return overallPassed; } private static boolean isValidFieldNumberTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; int N1 = -1; // {number: number < 1} int N2 = 2; // {number: 1 <= number <= gridSize * gridSize} int N3 = 1000; // {number: number > gridSize * gridSize} // CM1 = {currentMatches: currentMatches[number] == true} // CM2 = {currentMatches: currentMatches[number] == false} /** init test data */ char matrix[] = { 'A', 'A', 'B', 'B' }; GameConfiguration config = new GameConfiguration(2, matrix); config.trySetMatch(1, 2); /** Test case 1 */ passed = true; if (config.isValidFieldNumber(N1))
  • 14. passed = false; if (config.isValidFieldNumber(N3)) passed = false; // print message and prepare for next test logMsg(passed, "isValidFieldNumber", testCount, 'F'); overallPassed &= passed; testCount++; /** Test case 2 */ passed = true; if (config.isValidFieldNumber(N2 + 1) == false) passed = false; // print message and prepare for next test logMsg(passed, "isValidFieldNumber", testCount, 'F'); overallPassed &= passed; testCount++; /** Test case 3 */ passed = true; if (config.isValidFieldNumber(N2) == true) passed = false; // print message and prepare for next test logMsg(passed, "isValidFieldNumber", testCount, 'F'); overallPassed &= passed; testCount++; return overallPassed; } private static boolean trySetMatchTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; int M1_1 = -1; // {matchPosition1: matchPosition1 < 1} int M1_2 = 1; // {matchPosition1: 1 <= matchPosition1 <= gridSize * // gridSize} int M1_3 = 5; // {matchPosition1: matchPosition1 > gridSize * gridSize} int M2_1 = -1; // {matchPosition2: matchPosition2 < 1} int M2_2 = 2; // {matchPosition2: 1 <= matchPosition2 <= gridSize * // gridSize}
  • 15. int M2_3 = 5; // {matchPosition2: matchPosition2 > gridSize * gridSize} // MM1 = {gameMatrix: gameMatrix [matchPosition1 - 1] == // gameMatrix[matchPosition2 - 1]} // MM2 = {gameMatrix: gameMatrix [matchPosition1 - 1] != // gameMatrix[matchPosition2 - 1]} /** init test data */ char matrix[] = { 'A', 'A', 'B', 'B' }; GameConfiguration config = new GameConfiguration(2, matrix); /** Test case 1 */ passed = true; try { config.trySetMatch(M1_1, M2_2); passed = false; } catch (IllegalArgumentException e) { } try { config.trySetMatch(M1_3, M2_2); passed = false; } catch (IllegalArgumentException e) { } // print message and prepare for next test logMsg(passed, "trySetMatch", testCount, 'M'); overallPassed &= passed; testCount++; /** Test case 2 */ passed = true; try { config.trySetMatch(M1_2, M2_1); passed = false; } catch (IllegalArgumentException e) { } try { config.trySetMatch(M1_2, M2_3); passed = false; } catch (IllegalArgumentException e) { }
  • 16. // print message and prepare for next test logMsg(passed, "trySetMatch", testCount, 'M'); overallPassed &= passed; testCount++; /** Test case 3 */ passed = true; if (config.trySetMatch(M1_2, M2_2) == false) passed = false; // print message and prepare for next test logMsg(passed, "trySetMatch", testCount, 'M'); overallPassed &= passed; testCount++; /** Test case 4 */ passed = true; if (config.trySetMatch(M1_2, M2_2 + 1) == true) passed = false; // print message and prepare for next test logMsg(passed, "trySetMatch", testCount, 'M'); overallPassed &= passed; testCount++; return overallPassed; } private static boolean isGameFinishedTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; /** init test data */ char matrixEven[] = { 'A', 'A', 'B', 'B' }; GameConfiguration configEven = new GameConfiguration(2, matrixEven); char matrixOdd[] = { 'A', 'A', 'B', 'B', 'C', 'C', 'D', 'D', 'E' }; GameConfiguration configOdd = new GameConfiguration(3, matrixOdd); /** Test case 1 */ passed = true; if (configEven.isGameFinished() || configOdd.isGameFinished()) passed = false; // print message and prepare for next test
  • 17. logMsg(passed, "isGameFinished", testCount, 'G'); overallPassed &= passed; testCount++; /** Test case 2 */ configEven.trySetMatch(1, 2); configEven.trySetMatch(3, 4); passed = true; if (!configEven.isGameFinished()) passed = false; // print message and prepare for next test logMsg(passed, "isGameFinished", testCount, 'G'); overallPassed &= passed; testCount++; /** Test case 3 */ configOdd.trySetMatch(1, 2); configOdd.trySetMatch(3, 4); configOdd.trySetMatch(5, 6); configOdd.trySetMatch(7, 8); passed = true; if (!configEven.isGameFinished()) passed = false; // print message and prepare for next test logMsg(passed, "isGameFinished", testCount, 'G'); overallPassed &= passed; testCount++; return overallPassed; } private static boolean getGameMatrixTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; /** init test data */ char matrixEven[] = { 'A', 'A', 'B', 'B' }; GameConfiguration configEven = new GameConfiguration(2, matrixEven); /** Test case 1 */ passed = true;
  • 18. if (!Arrays.equals(configEven.getGameMatrix(), matrixEven)) passed = false; // print message and prepare for next test logMsg(passed, "getGameMatrix", testCount, 'A'); overallPassed &= passed; testCount++; return overallPassed; } private static boolean getCurrentMatchesTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; /** init test data */ char matrixEven[] = { 'A', 'A', 'B', 'B' }; GameConfiguration configEven = new GameConfiguration(2, matrixEven); /** Test case 1 */ passed = true; boolean matchesMatr[] = { false, false, false, false }; if (!Arrays.equals(configEven.getCurrentMatches(), matchesMatr)) passed = false; // print message and prepare for next test logMsg(passed, "getCurrentMatches", testCount, 'S'); overallPassed &= passed; testCount++; /** Test case 2 */ passed = true; matchesMatr[0] = true; matchesMatr[1] = true; configEven.trySetMatch(1, 2); if (!Arrays.equals(configEven.getCurrentMatches(), matchesMatr)) passed = false; // print message and prepare for next test logMsg(passed, "getCurrentMatches", testCount, 'S'); overallPassed &= passed; testCount++; return overallPassed;
  • 19. } private static boolean getGridSizeTest() { int testCount = 1; boolean passed = true; boolean overallPassed = true; /** init test data */ char matrixEven[] = { 'A', 'A', 'B', 'B' }; GameConfiguration configEven = new GameConfiguration(2, matrixEven); /** Test case 1 */ passed = true; if (!(configEven.getGridSize() == 2)) passed = false; // print message and prepare for next test logMsg(passed, "getGridSize", testCount, 'N'); overallPassed &= passed; testCount++; return overallPassed; } public static boolean classTest() { boolean retVal = true; // do constructor test retVal &= constructorTest(); // do isValidFieldNumber test retVal &= isValidFieldNumberTest(); // do trySetMatch test retVal &= trySetMatchTest(); // do isGameFinished test retVal &= isGameFinishedTest(); // do getGameMatrix test retVal &= getGameMatrixTest(); // do getCurrentMatches test retVal &= getCurrentMatchesTest(); // do getGridSize test retVal &= getGridSizeTest(); return retVal; }
  • 20. } note: due to limited characters i cant able to upload all files