Java questions

Assignment Help Software Engineering
Reference no: EM1378917

Question: The linked list that follows represents a stack. After we push the player (5, Joe, Sonic) onto the stack, what are first and last items on the stack?
(7,Ajay, NFL) -> (3, Sarah, Mario) -> (9, Jin, Golf) -> null
head

(7, Ajay, NFL0 and (9, Jin, Golf)
(5, Joe, Sonic) and (9, Jin, Golf)
(3, Sarah, Mario) and (5, Joe, Sonic)
(7, Ajay, NFL) and (5, Joe, Sonic)

A=

- The diagram that follows shows the current state of the stack represented by an array of 50 integers. After pushing 36, 88, and 62 onto the stack and popping three times from the stack, what will be the value of the top and what element will be stored at index top?
Index Item Stored
47(top) 28
46 98
... ...
3 17
2 12
1 20
0 45

Top is 49 and the element at index top is 62
Top is 47 and element at index top is 28
Top is 46 and element at index top is 98
Top is 50 and element at index top is 17

a=

- The diagram that follows shows the current state of a queque represented by circular array of 8 integers. After enqueuing 36, 100, 83, 77, and 62, what are the values of front and back, and what elements are stored at indexes front and back.
Index Item stored
7
6(back) 28
5 97
4 25
3 54
2(front) 12
1
0

A=

For these questions, consider the following classes from this chapter Player, PlayerNode, and PlayerLinkedList.

- What does this method of PlayerLinkedList class do?
Public void fool( Player p, Player q )
{
insert ( p );
insert ( q );
}

A=

- What does this method of PlayerLinkedList class do?
Public int f004( )
{
PlayerNode nd =head;
int i = 0;
while ( nd != null )
{
if (nd.getPlayer( ).getGame( ).equals( "Sonic") )
i++;
nd = nd.getNext( );
}
return i;
}

A=

- What does this method of PlayerLinkedList class do?
Public Boolean f008( )
{
if ( number0fitems <= 2 )
return false;
else
{
head.setNext( ( head.getNext ( ) ).getNext ( ) );
Number)fItems--;
return true;

A=

Reference no: EM1378917

Questions Cloud

Example of a business related report : Recognize an example of a business related report created with MS Excel. Attach a sample of the report in an Microsoft Excel file.
Determine the output of the code sequenc : Determine the output of this code sequence? The user successively enters 3, 5, and -1.
Calculation of the hypotenuse : Construct a C# console application that calculate the hypotenuse of a right triangle. The calculation of the hypotenuse of a right triangle is based on the Pythagorean Theorem:
Element of array : Discuss how do you access the element of array a located at row two and column four?
Java questions : The linked list that given represents a stack. After we push the player onto the stack, what are first and last items on the stack?
Aspects of software development : Unit testing is the driving technology behind a software design method termed Test Driven Development, which, in turn, is a factor of the agile school of software development.
Element of object oriented systems : Several people view the four foundational factors of object-orientation as abstraction, encapsulation, inheritance, and polymorphism. There is a certain purity in being minimal.
Construct the homogeneous solution : Construct the homogeneous solution in terms of four constant that could be determined from initial conditions and show the equations of motion
Discuss and define classical utilitarianism : Discuss and define Classical Utilitarianism and explain why, according to this view, nonhuman animals are entitled to equal moral concern.

Reviews

Write a Review

Software Engineering Questions & Answers

  Produce set of crc cards-uml diagram-javadoc comments

Produce a set of CRC cards, a UML diagram, and a set of javadoc comments (detailed JavaDoc only for each method created, no coding required).

  Write down critical success factors for project manager

Write down the critical success factors for project manager? what skills must managers look for when hiring someone who would be successful in this job?

  Use e-r approach to model operations of local library

Use the E-R approach to model the operations of your local community library. The library has books, CDs, tapes, and so forth, which are lent to library patrons.

  Draw flowchart-write pseudocode to represent logic

Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter three values.

  Linear-time algorithm-find odd-length cycle-directed graph

Give a linear-time algorithm to find an odd-length cycle in a directed graph. You may NOT assume that the graph is strongly connected.

  Draw er diagram that models information of company

Draw an ER diagram that models the information in the following scenario: A manufacturing company has several assembly plants in different cities.

  Create a diagram for many-to-many relationship of entity

One-to-many or many-to-many relationship. Then, using short-hand notation introduced in text, create a diagram for each of the relationships.

  Changes require to make to premiere products database design

Indicate changes (using shorthand representation) which you would require to make to Premiere Products database design to support following requirements.

  Create flowchart to calculate payroll of employee

Create a flowchart to calculate the payroll of each employee for one pay period. The flowchart should account for overtime as time and a half for any hours greater than 40.

  How to sketch flow chart to read employee master file

How to sketch flow chart to read employee master file and to output number of employees in each department who have a basic degree.

  Draw the physical data flow diagrams

Draw the physical data flow diagrams. Use Microsoft Visio to prepare examples of flow charts and data flow diagrams.

  Write down main ideas behind relational model

Write down the main ideas behind relational model? Why are they an improvement over what came before? In what ways is the relational model restrictive?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd