Ace - AI Tutor
Ask Our Educators
Textbooks
My Library
Flashcards
Scribe - AI Notes
Notes & Exams
Download App
mary thompson

mary t.

Divider

Questions asked

BEST MATCH

Given main(), complete the program to add people to a queue. The program should read in a list of people's names including "You" (ending with -1), adding each person to the peopleInQueue queue. Then, remove each person from the queue until "You" is at the head of the queue. Include print statements as shown in the example below. Ex: If the input is: Zadie Smith Tom Sawyer You Louisa Alcott -1 the output is: Welcome to the ticketing service... You are number 3 in the queue. Zadie Smith has purchased a ticket. You are now number 2 Tom Sawyer has purchased a ticket. You are now number 1 You can now purchase your ticket! write a correct java code: import java.util.Scanner; import java.util.LinkedList; import java.util.Queue; public class TicketingService { public static void main(String[] args) { Scanner scanner = new Scanner(System.in);

View Answer
divider
BEST MATCH

Q2. Design a CFG for the following language over the alphabet $\Sigma = \{a,b\}$. $L = \{ a^i b^j a^k | i = k, j \geq 2i \text{ where } i, k \geq 0 \}$

View Answer
divider
BEST MATCH

Three electric power plants with capacities of 25,40 , and 30 million kWh supply electricity to three cities. The maximum demands at the three cities are estimated at 30,35 , and 25 million kWh . The price per million kWh at the three cities is given in Table 5.25. \begin{tabular}{rccc} \hline TABLE 5.25 & \multicolumn{3}{c}{ Price/Million kWh for Problem 5-6 } \\ \hline \multicolumn{3}{c}{ City } \\ \cline { 3 - 4 } 1 & 1 & 2 & 3 \\ \cline { 2 - 4 } Plant 2 & \( \$ 600 \) & \( \$ 700 \) & \( \$ 400 \) \\ 3 & \( \$ 500 \) & \( \$ 300 \) & \( \$ 350 \) \\ \cline { 2 - 4 } & & \( \$ 480 \) & \( \$ 450 \) \\ \hline \end{tabular} During the month of August, there is a 20\% increase in demand at each of the three cities, which can be met by purchasing electricity from another network at a premium rate of \( \$ 1000 \) per million kWh . The network is not linked to city 3 , however. The utility company wishes to determine the most economical plan for the distribution and purchase of additional energy. (a) Formulate the problem as a transportation model. (b) Determine an optimal distribution plan for the utility company. (c) Determine the cost of the additional power purchased by each of the three cities.

View Answer
divider
BEST MATCH

A company selling widgets has found that the number of items sold $x$ depends upon the price $p$ at which they're sold, according the equation $x = \frac{40000}{\sqrt{5p} + 1}$. Due to inflation and increasing health benefit costs, the company has been increasing the price by $5 per month. Find the rate at which revenue is changing when the company is selling widgets at $300 each. dollars per month

View Answer
divider
BEST MATCH

The points p=(4,4,3),q=(-2,1,5) and r=(2,2,5) lie on a plane ax+by+cz=d in 3 dimensions (a) Compute the displacement vectors (b) Compute the cross product vector vec(pq) imes vec(pr)=(â—») (c) Write down a normal vector vec(n) of the plane vec(n)=(â—») (d) Write down the equation of the plane x+ y+ z= The pointsp=4,4,3q=-21,5andr=2,2,5lieonaplaneax+by+cz=d in3dimensions aCompute the displacement vectors (b)Compute the cross product vector td x bd (c write down a normal vector ri of the plane (a Write down the equation of the plane

View Answer
divider
BEST MATCH

The cost function for AMPG Inc. is given by: TC = 20 + 3Q^2

View Answer
divider
BEST MATCH

Given the following equation: $V = R \left( \frac{1}{n^2} - \frac{1}{m^2} \right)$ Deduce the value of $n$, if $V = 7$, $R = 8$ and $m = 8$. n =? (give answer to 2 d.p.)

View Answer
divider
BEST MATCH

In the article "The Singer Solution to World Poverty," what does Peter Singer say that most people would think about Dora if she had decided to keep her TV and not save the boy?

View Answer
divider
BEST MATCH

33. Translate to formal logic: (a) Is there a place that you like best? (b) Yes, George's Place. Their wines are especially good. (c) In fact, some items at George's are the best you can find anywhere. (d) But nobody goes to Harvey's Place. (e) Harvey's Place has the crummiest food in town.

View Answer
divider
BEST MATCH

(9) [10 pnts] Describe the information (output) that the following analysis type provides: > Soln > Analysis Type > New Analysis > Transient

View Answer
divider