Java | JSP | JSF Answers

Questions answered by Experts: 3 611

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

Tic-Tac-Toe game Abhinav and Anjali are playing the Tic-Tac-Toe game. Tic-Tac-Toe is a game played on a grid that's three squares by three squares. Abhinav is O, and Anjali is X. Players take turns putting their marks in empty squares. The first player to get 3 of her marks in a diagonal or horizontal, or vertical row is the winner. When all nine squares are complete, the game is over. If no player has three marks in a row, the game ends in a tie. Write a program to decide the winner in the Tic-Tac-Toe game. Input The input will be three lines contain O's and X's separated by space. Output The output should be a single line containing either "Abhinav Wins" or "Anjali Wins" or "Tie". Explanation For example, if the input is O X O O X X O O X as three of O's are in vertical row print "Abhinav Wins". Sample Input 1 O X O O X X O O X Sample Output 1 Abhinav Wins Sample Input 2 O O X X X O X O O Sample Output 2 Anjali Wins i want exact sample outputs sir

Using the above code add a method that takes in three arrays, one for student names, one for final test marks and a last one for assignment mark. The method should then calculate the students qualifying mark (a student needs 50 or more to qualify) using the following weights: 40% of the test and 60% of the assignment, finally print out whether the person qualified or not.

Name Test  Assignment  Final Examination


King   59     85             75    Allowed

John 52    45              48    Denied

Sample Test 1:

Enter the total number of students:

3

Enter name:

koko

Enter name:

jojo

Enter name:

momo

Enter mark for Test 1:

78

Enter mark for Test 2:

65

Enter mark for Test 3:

70

Enter mark for Test 1:

55

Enter mark for Test 2:

56

Enter mark for Test 3:

89

Enter mark for Test 1:

45

Enter mark for Test 2:

25

Enter mark for Test 3:

38

Enter assignment Mark:

66

Enter assignment Mark:

86

Enter assignment Mark:

70

Name Test01 Test02 Test03 Final


koko  78    65    70    71

jojo   55    56    89    67

momo 45    25    38    36



Complete the array representing the buckets for a bucket sort for the following array. This is done using Integers and the key is the value. The value that you have to enter is the amount of elements in each list. An empty list will have a value of 0. A list with 3 elements will have a value of 3.



4 3 6 4 3 4 5 6 3 5 6 5




0 1 2 3 4 5 6 7 8 9


Blank 1. Fill in the blank, read surrounding text.


Blank 2. Fill in the blank, read surrounding text.


Blank 3. Fill in the blank, read surrounding text.


Blank 4. Fill in the blank, read surrounding text.


Blank 5. Fill in the blank, read surrounding text.


Blank 6. Fill in the blank, read surrounding text.


Blank 7. Fill in the blank, read surrounding text.


Blank 8. Fill in the blank, read surrounding text.


Blank 9. Fill in the blank, read surrounding text.


Blank 10. Fill in the blank, read surrounding text.


When using the Quick sort on the following array Complete the index of the following.



pivot: Blank 1. Fill in the blank, read surrounding text.



Low: Blank 2. Fill in the blank, read surrounding text.



High: Blank 3. Fill in the blank, read surrounding text.



The indexes of the first swap low = Blank 4. Fill in the blank, read surrounding text.


high = Blank 5. Fill in the blank, read surrounding text.



The index of the pivot that is returned. Blank 6. Fill in the blank, read surrounding text.



3 8 7 6 7 2 4 1 5


What array will best fit this array after three steps of the insertion sort.



6 8 9 1 4 2 5 7 3 0


A. [1,2,4,6,8,9,5,7,3,0]


B. [1,6,8,9,4,2,5,7,3,0]


C. [1,2,4,5,6,7,8,9,3,0]


D. [1,4,6,8,9,2,5,7,3,0]

What array will best fit this array after seven passes of the bubble sort.



5 7 9 1 4 2 6 8 3 0


A. [1,2,0,3,4,5,6,7,8,9]


B. [1,2,4,5,3,0,6,7,8,9]


C. [1,4,2,5,6,3,0,7,8,9]


D. [4,1,6,2,5,7,3,0,8,9]



You are recently hired by BKJob as a Trainee Developer under the Mentorship program. You are


deployed with Team Edu as your start.


Team Edu is currently working on a Project that involves Object Oriented Programming skills; hence,


the team leader has assigned you the task to develop a report comprising of the following:


• Examine the object-oriented programming paradigm characteristics and develop a professionally


formatted report that would include these characteristics (i.e., Encapsulation, polymorphism,


constructors/destructors, sub-objects, abstract/concrete, interface, method, redefinition,


generics/templates, containers, etc. Also include the information about class relationships like


generalization/Inheritance, realization, dependency, aggregation, composition, etc.


• Determine the design patterns from each of the creational, structural and behavioral pattern types


• Analyze the relationship between the OOP paradigm and the design patterns

Consider an example of online taxi services (i.e., Grab). The company has a list of customers and drivers.







When a customer requests a cab, then a driver accepts and visits the customer for a ride. Which







pattern can be used to implement this scenario? Explain with a UML diagram and also explain the list of







classes and methods involved in this pattern. After that, you must use an IDE (Eclipse) to implement







your design.







Note: You must submit a report and your code.

You are required to implement design patterns using an IDE such as Eclipse. Tasks are following:


• Setup of a project with version control. develop a small application that implements a few examples of


creational, structural and behavioral design patterns.


• Evaluate the use of design patterns for the given purpose specified. Discuss trade-offs/consequences by


applying design patterns.


Note: You must submit a report and full examples code.

Create a program with three methods/functions, The first one takes in n which is the size of an array then creates and populate the array with student names, the second method takes in n which is the size of an array then creates and populate n by 3 array with student marks(The three marks are for test 1 - 3) and finally a method that takes in the two arrays, calculates the final mark of all test and print out the results as indicated below: The first method should return and array of names and the second should return an array all test marks(i.e. 2d array with 3 columns). The third method in addition should also return an array for all the final marks

Name Test 01        Test 02        Test 03        Final

-------- ---------     ---------     ---------    ---------

Gerry 55               55               55               55


LATEST TUTORIALS
APPROVED BY CLIENTS