Do some programming

Σε Εξέλιξη

Question 2

myBag is an object of type BagInterface. myBag currently contains the Strings:

carla

larry

tommy

hillary

What will be printed after the following is executed?

[url removed, login to view]([url removed, login to view]());

Select one:

larry

carla

hillary

tommy

null

You cannot tell

Question 3

myList is an object of type ListInterface. myList currently contains the Strings:

cabbage

squash

banana

orange

What will be printed after the following is executed?

[url removed, login to view]([url removed, login to view](4));

Select one:

cabbage

squash

banana

orange

null

Question 4

list is an object of type ListInterface that contains the strings:

goose

dog

horse

elephant

Which of the following statements will result in list containing:

goose

dog

elephant

Select one:

[url removed, login to view](1);

[url removed, login to view](2);

[url removed, login to view](3);

[url removed, login to view](4);

none of the above

Question 5

myList is an object of type ListInterface. myList currently contains the Strings:

car

food

dog

lamp

What will the list contain after the following is executed?

[url removed, login to view](2, "book");

Write the contents of the list with each element separated by a single space.

Answer:

Question 6

Write a complete method at the client level called countGreaterThan.

◦ The method counts how many items in a bag are greater than some number.

◦ For example, if a bag contains (8, 9, 6, 3, 8, 6, 1) and you invoke the method with number = 3, the method will return 5 because there are 5 numbers greater than 3 in the bag (the 8, 9, 6, 8 and 6).

◦ The bag should not be altered when the method completes.

◦ The method header is:

public int counterGreaterThan(BagInterface<Integer> bag, int number)

◦ For this question, you are writing code at the client level. This means you do not know how the bag is implemented.

◦ Use any of the following BagInterface methods to answer the question below.

◦ Note that toArray is not listed and should not be used in your solution.

public boolean add(T newEntry)

public boolean isEmpty()

public boolean contains(T anObject)

public boolean remove()

public boolean remove(T anEntry)

public int getFrequencyOf(T anEntry)

public int getCurrentSize()

public void clear()

Question 7

Write a complete method at the client level called containsExactlyOnce.

◦ The method determines whether String is contained on a list exactly one time.

◦ The list should not be altered by the method.

◦ The method header is:

public boolean containsExactlyOnce(ListInterface<String> list, String entry)

◦ For this question, you are writing code at the client level. This means you do not know how the list is implemented.

◦ Use any of the following ListInterface methods to answer the question below.

◦ Note that toArray is not listed and should not be used in your solution.

public void add(T newEntry)

public void add(int newPosition, T newEntry)

public boolean isEmpty()

public boolean contains(T anObject)

public T remove(int givenPosition)

public T replace(int givenPosition, T newEntry)

public T getEntry(int givenPosition)

public int getLength()

public void clear()

Question 8

The private data for an array-based AList object called aList is below:

numberOfEntries

5

entry[0] entry[1] entry[2] entry[3] entry[4] entry[5] entry[6]

26 36 51 38 31


What will be the list contents after executing [url removed, login to view](1,61);

Select one:

26, 36, 51, 38, 31, 61

61, 36, 51, 38, 31

26, 61, 36, 51, 36, 31

61, 26, 36, 51, 38, 31

none of the above

Question 9

In the AList implementation, when an array-based list is empty

Select one or more:

the numberOfEntries field contains 0

the array is set to null

the array is re-sized to have no elements (meaning [url removed, login to view] = 0)

Δεξιότητες: Java, JavaFX, Javascript, Αρχιτεκτονική Λογισμικού, Δοκιμή Λογισμικού

Δείτε περισσότερα: why do you want to work here answer, what programming do i need for a website, programming logic and design comprehensive 7th edition answer key, can anyone do freelance programming, best website to do your assignments programming, where do i find programming software for led signs, how to do programming in excel, how to do java programming online, how do i come a programming, hire someone to do programming homework, websites people do programming, how do i hire a research scientist that works with food, how do i get a programming environment on my pc, how can we do confirmit survey programming from home, hire project to do your homework programming, hire people to do programming project, finding people to do programming system singapore, do my assignment programming, programming finite element java, language programming quiz answer, upload multiple files single file element php, programming questions options answer, finite element programming matlab, flex httpservice bug single element, create multiple choice single answer quizzes flash

ID Εργασίας: #11806984

Ανατέθηκε στον/στην:

vano101

There is my bid. .

$18 USD σε 1 μέρα
(1056 Αξιολογήσεις)
7.2

5 freelancers κάνουν προσφορές με μέσο όρο $21 γι' αυτή τη δουλειά

$40 USD σε 1 μέρα
(74 Αξιολογήσεις)
6.2
$14 USD σε 1 μέρα
(5 Αξιολογήσεις)
2.5
allWebDesignPro

Hello, I am java programmer and web Developer and if interested in my offer please write more about the details of the project in a private message

$20 USD σε 3 μέρες
(2 Αξιολογήσεις)
2.1
$15 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0
amariitism

Hello Our team consists of 10 people and I am the Team Leader. We are highly supportive to the employer. We are approachable, you can come to us if you have a struggle, we are happy to help. Expertise:- Virtu Περισσότερα

$15 USD σε 1 μέρα
(0 Αξιολογήσεις)
0.0