Questions
Briefly discuss six reasons why it is necessary for students of Ghanaian tertiary institutions to take...

  1. Briefly discuss six reasons why it is necessary for students of Ghanaian tertiary institutions to take African Studies as general course of their studies.

In: Psychology

How can you build conceptual knowledge related to the 10 themes in social studies for your...

How can you build conceptual knowledge related to the 10 themes in social studies for your students? Share two examples.

In: Economics

What is an effective SEI strategy used in the classroom? Why does this strategy work? Does...

What is an effective SEI strategy used in the classroom? Why does this strategy work? Does these teaching concepts tie to the students background?

In: Psychology

What are the most important features of effective instruction for students with intellectual disabilities? What are...

What are the most important features of effective instruction for students with intellectual disabilities?
What are alternative ways of identifying children with learning disabilities?

In: Psychology

What impact might physical health and cognitive changes have on middle age adults (non-traditional students) returning...

What impact might physical health and cognitive changes have on middle age adults (non-traditional students) returning to college?

In: Psychology

Solutions Plus is an industrial chemicals company that produces specialized cleaning fluids and solvents for a...

Solutions Plus is an industrial chemicals company that produces specialized cleaning fluids and solvents for a wide variety of applications. Solutions Plus just received an invitation to submit a bid to supply Great North American railroad with a cleaning fluid for locomo- tives. Great North American needs the cleaning fluid at 11 locations (railway stations); it provided the following information to Solutions Plus regarding the number of gallons of cleaning fluid required at each location (see Table 6.8). Solutions Plus can produce the cleaning fluid at its Cincinnati plant for $1.20 per gal- lon. Even though the Cincinnati location is its only plant, Solutions Plus has negotiated

TABLe 6.8 GALLONS OF CLEANING FLUID REQUIRED AT EACH LOCATION

Location

Gallons Required

Location

Gallons Required

Santa Ana

22,418

Glendale

33,689

El Paso

6,800

Jacksonville

68,486

Pendleton

80,290

Little Rock

148,586

Houston

100,447

Bridgeport

111,475

Kansas City

24,570

Sacramento

112,000

Los Angeles

64,761

Table 6.9

Freight Cost ($ Per Gallon)

Cincinnati Oakland
Santa Ana 0 0.22
El Paso 0.84 0.74
Pendleton 0.83 0.49
Houston 0.45 0
Kansas City 0.36 0
Los Angeles 0 0.22
Glendale 0 0.22
Jacksonville 0.34 0
Little Rock 0.34 0
Bridgetport 0.34 0
Sacramento 0 0.15

with an industrial chemicals company located in Oakland, California, to produce and ship up to 500,000 gallons of the locomotive cleaning fluid to selected Solutions Plus customer locations. The Oakland company will charge Solutions Plus $1.65 per gallon to produce the cleaning fluid, but Solutions Plus thinks that the lower shipping costs from Oakland to some customer locations may offset the added cost to produce the product. The president of Solutions Plus, Charlie Weaver, contacted several trucking companies to negotiate shipping rates between the two production facilities (Cincinnati and Oakland) and the locations where the railroad locomotives are cleaned. Table 6.9 shows the quotes received in terms of dollars per gallon. The “—” entries in Table 6.9 identify shipping routes that will not be considered because of the large distances involved. These quotes for shipping rates are guaranteed for one year. To submit a bid to the railroad company, Solutions Plus must determine the price per gallon it will charge. Solutions Plus usually sells its cleaning fluids for 15% more than its cost to produce and deliver the product. For this big contract, however, Fred Roedel, the director of marketing, suggested that maybe the company should consider a smaller profit margin. In addition, to ensure that if Solutions Plus wins the bid, it will have adequate capacity to satisfy existing orders as well as accept orders for other new business, the management team decided to limit the number of gallons of the locomotive cleaning fluid produced in the Cincinnati plant to 500,000 gallons at most.

3. If Solutions Plus wants to use its standard 15% markup, how much should it bid?

In: Finance

26.5 Project 3: List & Queue ADT Overview For this project, you are to implement two...

26.5 Project 3: List & Queue ADT

Overview

For this project, you are to implement two abstract data types (ADTs). You will write a doubly linked list (Dll) and a queue class. The queue will use the dll internally. The class interfaces are downloadable below. You must follow the interface exactly. While you can define other public and private methods and fields, the class names and methods given must appear as provided, or you will not pass the unit tests. Include the implementation of the classes in their respective header (.h) files. Please note: Dll is not a node class, as in, a Dll does not point to another Dll; it contains nodes internally.

Dll Comments

When inserting into a dll, rank 0 inserts at the front of the list and rank size() inserts at the back of the list. If you have the list 0 -> 10 -> 30, then after insert(2, 20), the list should be 0 -> 10 -> 20 -> 30.

When removing from a dll, rank 0 removes from the front of the list and rank size() - 1 removes from the back of the list. If you have the list 0 -> 10 -> 20 -> 30, then after remove(2), the list should be 0 -> 10 -> 30.

When building a dll from an array, the array [ 0 1 2 ] should create the list 0 -> 1 -> 2.

Displaying

When displaying a Dll, it should appear with the head on the left and the tail on the right. For example, the list created after insert(0, 3), insert(0, 2), insert(0, 1) should represent the list 1 -> 2 -> 3 and should display as follows:

[ 1 2 3 ]

When displaying a queue, it should appear with the front on the left and the back on the right. For example, the queue created after enqueue(1), enqueue(2), enqueue(3) should display as follows:

[ 1 2 3 ]

When displaying an empty ADT, it should be a single space surrounded by brackets:

[ ]

Efficiency

All operations should have an efficient runtime. Besides display(), all queue operations should run in O(1). Because the queue uses a dll internally, this means insert(), remove(), and size() must be O(1) for the appropriate cases (insert back, remove front), which also means size should be stored and not calculated by looping through the list.

Exceptions

Two exception classes can be found in exceptions.h: InvalidOperationException and IndexOutOfRangeException. Your ADTs will throw exceptions according to the instructions below:

  • List: throw IndexOutOfRangeException for the following operations:
    • at(): when accessing an index outside the bounds (0 to size-1 inclusive) of the linked list with the message "at(): Index was outside the bounds of the linked list."
    • insert(): when index is not in the range from 0 to size (inclusive) with the message "insert(): Index was outside the bounds of the linked list."
    • remove(): when removing an index outside the bounds (0 to size-1 inclusive) of the linked list with the message "remove(): Index was outside the bounds of the linked list."
  • Queue: throw InvalidOperationException with the message "Queue empty." when dequeuing or peeking an empty queue.

p3.cpp

p3.cpp is a command-line interface that can be used to test your data structures. Review the code before running it and testing your data structures. p3.cpp assumes your dll.h and queue.h are completed. You must comment out the portions of the code that you have not implemented (includes and the loops in main pertaining to the data structure) or create "empty" method definitions to make it compilable.

You can compile your program with g++ p3.cpp.

Notes

  • Your data structures will be unit tested separately, meaning Dll can be tested accurately without a fully implemented Queue.
  • Be sure to print to the ostream os variable and not to cout or you will fail the test cases.
  • Throw the exceptions if the index is negative.
  • Be sure to initialize pointers to NULL or nullptr as *nix environments do not initialize variables to 0.

In: Computer Science

3. FBA would like to explore the studying time of its students. Management suspects that the...

3. FBA would like to explore the studying time of its students. Management suspects that the mean studying time is less than 48 hours. A random sample of 10 FBA students contains the following observations, in hours, for time spent studying in the week before final examinations:

28 57 42 35 61 39 55 46 49 38

a. At 5% significance level, state the decision rule for the hypotheses.

b. Calculate the value of the test statistic.

c. Based on the decision rule in part (f), what would you report to the management?

In: Statistics and Probability

8) Is achieving a basic skill level related to the location of the school? The results...

8) Is achieving a basic skill level related to the location of the school? The results of a random sample of students by the location of the school and the number of students achieving the basic skill level in three subjects is shown in the contingency table. At α=0.01

location reading math science
urban 40 49 41
suburban 60 66

68

a) state null and alternative hypothesis mathematically and write your claim

b) find standardized test statistic

c) decide whether to reject or fail to reject the null

d) make an interpretation of your decision in the context

In: Statistics and Probability

Suppose that for all Miami University STA 261 students, the average distance that they live from...

Suppose that for all Miami University STA 261 students, the average distance that they live from campus is 12.2 miles with a standard deviation of 8.0 miles. A random sample of 49 Miami university STA 261 students was taken, and the sample average distance that they live from campus was calculated.

a. what is the shape of the population distribution? Briefly explain your response

b. What is the probability that a randomly selected MU STA 261 student lives at least 10 miles from campus?

c. What is the probability that the sample average will have a value of at least 10 miles?

In: Statistics and Probability