Consider the movie ticket and popcorn example discussed in
Section 17.7. The theater sells two products, tickets and popcorn.
Suppose the weekly demand for movie tickets is
Qdtix=500−25Ptix−20Ppopcorn,
where Ptix and
Ppopcorn are the prices of a ticket
and a bag of popcorn, respectively. Suppose that each time a
moviegoer buys a ticket, his demand for popcorn is
Qdpopcorn=3−0.4Ppopcorn,
where Qdpopcorn is the number of
bags of popcorn the moviegoer buys. Suppose further that the
theater's marginal cost of a ticket is $2, while the marginal cost
of popcorn is $3.
Instructions: Round your answer to 2 decimal
places.
a. What is the profit-maximizing price of a movie ticket if a bag
of popcorn sells for $5 a bag?
$.
In: Advanced Math
*****IN JAVA****
Implement a theater seating chart as a two-dimensional array of ticket prices, like this:
{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}
{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}
{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}
{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}
{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}
{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}
{20, 20, 30, 30, 40, 40, 30, 30, 20, 20}
{20, 30, 30, 40, 50, 50, 40, 30, 30, 20}
{30, 40, 50, 50, 50, 50, 50, 50, 40, 30}
Write a code snippet that:
- uses a for loop to print the array with spaces between the seat prices
- prompts users to pick a row and a seat using a while loop and a sentinel to stop the loop.
- outputs the seat price to the user.
In: Computer Science
In: Accounting
In: Statistics and Probability
Java
I'm trying to create a program that replicates a theater ticket reservation system. I have a Seat class with members row(integer), seat(character) and ticketType(character). Where a ticket type can be 'A' adult, 'C' child, 'S' senior, or '.' recorded as empty. I have a Node generic class that points to other nodes(members): up, Down. Left, Right. It also has a generic payload. Lastly, I have an Auditorium class which is also generic. its member is a First Node<T>.
As you can see, its a linked list of nodes where each node is supposed to be a seat (Node<Seat>). The Auditorium is supposed to be a grid of Seat Nodes that contain the seat information within. This way, I can later use the information to intake customer orders and check availability, recommend a best option if not available, etc.
My problem is I'm having trouble creating an overloaded constructor for the Auditorium class. The current auditorium seating information is held in a text file with text such as:
AA.AA....AAA..AACCSS
..AC.....A.........A
S...........AACCCAAC
.AA...CC.SS.....SSC.
A.A..S...S..A......A
I need to add each seat into a node into the auditorium grid before asking the customer for their order to know seat availability.
I tried creating this LONG constructor, but I think the issue is converting the item of type Seat into an item or generic T ((T)currentSeat). This causes the auditorium to output A as ticket type for EVERY single seat in the auditorium. Could you give advice on how to better create an auditorium through the constructor?
for(int i = 0 ; i < rows ;
i++)
{
//System.out.println("row " + i);
currentRowFromFile = readFile.nextLine();
for (int j = 0;
j < columns; j++)
{
//System.out.println( "column " + j);
currentSeat.setRow(i);
currentSeat.setSeat((char)('A'+ j));
//System.out.print("seat column ");
//System.out.println((char)('A'+ j));
currentSeat.setTicketType(currentRowFromFile.charAt(j));
if(j == 0 && i == 0)
{
First = new Node<T>
((T)currentSeat);
lastNodeCreated =
First;
thisRowsFirstElement =
First;
System.out.println("The node
being added for index " + i + " " + j + "has seat type: " +
currentSeat.getTicketType());
}
if(j == 0 && i!= 0) // new row first
element
{
//first column on a different
row
Node<T>newNodeToInsert
= new Node<T>((T)currentSeat);
thisRowsFirstElement.setDown(newNodeToInsert); //move
down
thisRowsFirstElement.getDown().setUp(thisRowsFirstElement);
thisRowsFirstElement =
thisRowsFirstElement.getDown(); // now continue on this row
lastNodeCreated =
thisRowsFirstElement;
System.out.println("The node
being added for index " + i + " " + j + "has seat type: " +
currentSeat.getTicketType());
}
else if(i == 0 && j != 0) // top
row
{
Node<T> newNodeToInsert
= new Node<T>((T)currentSeat);
lastNodeCreated.setRight(newNodeToInsert);
lastNodeCreated.getRight().setLeft(lastNodeCreated); //
<-->
lastNodeCreated =
lastNodeCreated.getRight();
System.out.println("The node
being added for index " + i + " " + j + "has seat type: " +
currentSeat.getTicketType());
}
else if(i != 0 && j != 0) // not top row
or first column
{
Node <T>
newNodeToInsert = new Node<T> ((T)currentSeat);
lastNodeCreated.setRight(newNodeToInsert);
lastNodeCreated.getRight().setLeft(lastNodeCreated);
lastNodeCreated.getRight().setUp(lastNodeCreated.getUp().getRight());
lastNodeCreated.getUp().getRight().setDown(lastNodeCreated.getRight());
lastNodeCreated =
lastNodeCreated.getRight();
System.out.println("The node
being added for index " + i + " " + j + "has seat type: " +
currentSeat.getTicketType());
}
}
In: Computer Science
Forte Inc. produces and sells theater set designs and costumes. The company began operations on January 1, Year 1. The following transactions relate to securities acquired by Forte Inc., which has a fiscal year ending on December 31:
|
Year 1 |
||
| Jan. | 22 | Purchased 23,600 shares of Sankal Inc. as an available-for-sale security at $18 per share, including the brokerage commission. |
| Mar. | 8 | Received a cash dividend of $0.21 per share on Sankal Inc. stock. |
| Sep. | 8 | A cash dividend of $0.24 per share was received on the Sankal stock. |
| Oct. | 17 | Sold 4,700 shares of Sankal Inc. stock at $15 per share less a brokerage commission of $60. |
| Dec. | 31 | Sankal Inc. is classified as an available-for-sale investment and is adjusted to a fair value of $26 per share. Use the valuation allowance for available-for-sale investments account in making the adjustment. |
Record these transactions on page 11:
|
Year 2 |
||
| Jan. | 10 | Purchased an influential interest in Imboden Inc. for $1,287,000 by purchasing 165,000 shares directly from the estate of the founder of Imboden Inc. There are 500,000 shares of Imboden Inc. stock outstanding. |
| Mar. | 10 | Received a cash dividend of $0.29 per share on Sankal Inc. stock. |
| Sep. | 12 | Received a cash dividend of $0.24 per share plus an extra dividend of $0.06 per share on Sankal Inc. stock. |
| Dec. | 31 | Received $56,400 of cash dividends on Imboden Inc. stock. Imboden Inc. reported net income of $489,800 in Year 2. Forte Inc. uses the equity method of accounting for its investment in Imboden Inc. |
| Dec. | 31 | Sankal Inc. is classified as an available-for-sale investment and is adjusted to a fair value of $21 per share. Use the valuation allowance for available-for-sale investments account in making the adjustment for the decrease in fair value from $26 to $21 per share. |
| Required: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 1. | Journalize the entries to record these transactions. Refer to the information given and the Chart of Accounts provided for the exact wording of the answer choices for text entries. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Prepare the investment-related asset and stockholders’ equity balance sheet presentation for Forte Inc. on December 31, Year 2, assuming the Retained Earnings balance on December 31, Year 2, is $376,000. Refer to the Chart of Accounts and Amount Descriptions provided for the exact wording of the answer choices for text entries. “Less” or “Plus” will automatically appear if it is required. For those boxes in which you must enter subtracted or negative numbers use a minus sign | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HART OF ACCOUNTS | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Forte Inc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| General Ledger | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Forte Inc. produces and sells theater set designs and costumes. The company began operations on January 1, Year 1. The following transactions relate to securities acquired by Forte Inc., which has a fiscal year ending on December 31:
Record these transactions on page 10:
|
Year 1 |
||
| Jan. | 22 | Purchased 19,600 shares of Sankal Inc. as an available-for-sale security at $19 per share, including the brokerage commission. |
| Mar. | 8 | Received a cash dividend of $0.21 per share on Sankal Inc. stock. |
| Sep. | 8 | A cash dividend of $0.24 per share was received on the Sankal stock. |
| Oct. | 17 | Sold 1,600 shares of Sankal Inc. stock at $15 per share less a brokerage commission of $80. |
| Dec. | 31 | Sankal Inc. is classified as an available-for-sale investment and is adjusted to a fair value of $25 per share. Use the valuation allowance for available-for-sale investments account in making the adjustment. |
Record these transactions on page 11:
|
Year 2 |
||
| Jan. | 10 | Purchased an influential interest in Imboden Inc. for $886,950 by purchasing 121,500 shares directly from the estate of the founder of Imboden Inc. There are 450,000 shares of Imboden Inc. stock outstanding. |
| Mar. | 10 | Received a cash dividend of $0.29 per share on Sankal Inc. stock. |
| Sep. | 12 | Received a cash dividend of $0.24 per share plus an extra dividend of $0.06 per share on Sankal Inc. stock. |
| Dec. | 31 | Received $53,800 of cash dividends on Imboden Inc. stock. Imboden Inc. reported net income of $407,200 in Year 2. Forte Inc. uses the equity method of accounting for its investment in Imboden Inc. |
| Dec. | 31 | Sankal Inc. is classified as an available-for-sale investment and is adjusted to a fair value of $23 per share. Use the valuation allowance for available-for-sale investments account in making the adjustment for the decrease in fair value from $25 to $23 per share. |
| Required: | |
| 1. | Journalize the entries to record these transactions. Refer to the information given and the Chart of Accounts provided for the exact wording of the answer choices for text entries. |
| 2. | Prepare the investment-related asset and stockholders’ equity balance sheet presentation for Forte Inc. on December 31, Year 2, assuming the Retained Earnings balance on December 31, Year 2, is $415,000. Refer to the Chart of Accounts and Amount Descriptions provided for the exact wording of the answer choices for text entries. “Less” or “Plus” will automatically appear if it is required. For those boxes in which you must enter subtracted or negative numbers use a minus sign. |
In: Accounting
the manager of an amusement park would like to be able to predict daily attendance in order to develop more accurate plans about how much food to order and how many ride operators to hire. after some consideration, he decided the following three factors are critical: 1. Yesterday's attendance 2. Weekday or Weekend 3. Predicted Weather He then took a random sample of 40 days. For each day, he recorded the attendance, day of the week, and weather forecast. The first independent variable is interval, but the other two are nominal. Accordingly, he created the following sets of indicator variables:
I1 = 1- (IF WEEKEND) 0 - (IF NOT)
I2 = 1 - (IF MOSTLY SUNNY IS PREDICTED) 2 - (IF NOT)
I3 = 1 - (IF RAIN IS PREDICTED) 2 - (IF NOT)
A. Conduct regression analysis
B. Is model valid? Explain
C. Can we conclude weather is a factor in determining attendance
D. Do these results provide sufficient evidence that weekend attendance is, on average, larger than weekday attendance?
I will attach data in another question
In: Statistics and Probability
#1. [Water Slide & Swing] You are designing a slide for a water park. In a sitting position, park guests slide a vertical distance h down the water slide, which has negligible friction. When they reach the bottom of the slide, they grab a handle at the bottom end of a 6.00-m-long uniform pole. The pole hangs vertically, initially at rest. The upper end of the pole is pivoted about a stationary, frictionless axle. The pole with a person hanging on the end swings up through an angle theta max , and then the person lets go of the pole and drops into a pool of water. Treat the person as a point mass. The pole’s moment of inertia is given by I = (1/3)ML , where L = 6.00 m is the length of the pole and M = 24.0 kg is its mass. In your design, a person of mass m = 70.0 kg is to have a maximum angle of swing of theta max = 72.0˚ after their collision with the pole.
(a) In the "collision" between the slider and the pole, why is angular momentum about the pole's pivot conserved, but linear momentum and kinetic energy are not conserved? Assume that the slider is moving horizontally when they grab the handle on the vertically hanging pole.
(b) What is the angular speed of rotation of the pole & swinger just after the swinger grabs on, in terms of the final height the swinger reaches?
(c) What is the speed of the swinger at the bottom of the slide just before reaching the pole, in terms of their speed just after grabbing the pole?
(d) For a person of mass m = 70.0 kg, what must be the starting height h in order for the pole with person to have a maximum angle of swing of theta max = 72.0˚ after the collision?
In: Physics
Suppose a group of volunteers is planning on building a park near a local lake. The lake is known to contain low levels of arsenic (As). Therefore, prior to starting construction, the group decides to measure the current level of arsenic in the lake.
a) If a 15.7 cm3 sample of lake water is found to have 164.5 ng As, what is the concentration of arsenic in the sample in parts per billion (ppb), assuming that the density of the lake water is 1.00 g/cm3?
One of the volunteers suggests hiring an on-site water treatment company to remove the arsenic from the lake. The company claims their process takes 2.74 days to remove 41.90 kg of As from a water source.
b) Calculate the total mass (in kg) of arsenic in the lake that the company will have to remove if the total volume of water in the lake is 0.710 km3?
c) Based on the company\'s claim and the concentration of arsenic in the lake, how many years will it take to remove all of the arsenic from the lake, assuming that there are always 365 days in a year?
In: Chemistry