JAVA: Suppose we have a number of triangles and quadrilaterals in a 2-dimensional coordinate plane. we want to be able to easily determine the perimeter of each shape and move shapes around the coordinate plane. Download the Shape.java and Point.java from Moodle. - Shape.java is an interface contains getPerimeter() and move() abstract methods. - Point.java is a class object which provides getX(), getY(), distanceTo(Point p) and move() methods. Design two classes named Quadrilateral and Triangle that implement Shape interface to determine their perimeter of each shape and move shapes around the coordinate plane. Test your classes in a Driver class that use (1.0, 1.0), (1.0, 2.0), (2.0, 1.0) and (2.0, 2.0) as coordinates for Quadrilateral vertices and (1.0, 1.0), (1.0, 2.0), (2.0, 1.0) as coordinate for Triangle. Use methods from Point Object to calculate their perimeters and display their results. Use move method from Point Object to increment x coordinate by 1.0 and y coordinate by 2.0 for all vertices of both shapes. Calculate their perimeters and display their results.
SHAPE
import java.util.*;
public interface Shape {
public double getPerimeter();
public void move(double deltaX, double deltaY);
}
POINT
import java.util.*;
public class Point {
private double x;
private double y;
public Point(double x, double y) {
this.x = x;
this.y = y;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public double distanceTo(Point p) {
return Math.sqrt(Math.pow(this.getX() - p.getX(), 2) +
Math.pow(this.getY() - p.getY(), 2));
}
public void move(double deltaX, double deltaY) {
x += deltaX;
y += deltaY;
}
}
In: Computer Science
A trainer wishes to find out if there is a relationship between the number of miles walked per week and the weight of a person. The data for the sample are shown:
Miles Walked, x: 15 20 3 12 17 8
Weight (lbs.), y: 147 106 210 160 122 165
a) Compute the value of the correlation coefficient.
b) Find the equation of the regression line.
c) Find y’ (the weight) when x = 11. (Someone walks 11 miles).
In: Statistics and Probability
An auto maker claims that the mean gas mileage of its luxury sedan is at least 25 miles per gallon. A random sample of 36 such cars were tested and resulted in a sample mean of 24.2 miles per gallon and a sample standard deviation of 2.8 miles per gallon. At α = 0.05, is there sufficient evidence to reject the auto maker’s claim?
Claim:
H0:
H1:
Test Statistic:
Critical Region/Critical Value:
Decision about H0:
In: Statistics and Probability
Tire lifetime:the lifetime of a certain type of automobile tire(in thousands of moles) is normally distributed with mean u=41 and standard deviation o=4 What is the probability that a radon chosen tire has lifetime greater than 50 thousand miles? What proportion of tires have lifetime between 36 and 45 thousand miles What proportion of tires have lifetimes less than 46 thousand miles? Round answers at least 4 places
In: Math
Write a program to compute the total time and average speed it will take a runner to run 10 miles with the following pace segments:
they run the first mile at a pace of 7 minutes per mile, the following 4 miles at a pace of 8.5 minutes per mile, the next 4 miles at a pace of 9 minutes per mile and the last mile at a pace of 3.5 minutes per mile.
Performs the computations and prints the results in a single nice message
Language PYTHON3
In: Computer Science
You are given the sample mean and the population standard deviation. Use this information to construct the 90% and 95% confidence intervals for the population mean. Interpret the results and compare the widths of the confidence intervals. If convenient, use technology to construct the confidence intervals. A random sample of 60 home theater systems has a mean price of $120.00. Assume the population standard deviation is $15.40. Construct a 90% confidence interval for the population mean.
In: Statistics and Probability
For each of the following scenarios, list the purpose(s) of the visualization and the type(s) of visualization that would best fulfill the purpose(s). Justify your choice.
a. A stock analyst is showing a potential customer how projected returns from various mutual funds will affect the size of retirement savings over time.
b. A tax accountant is showing the CFO how the accumulated
effect of asset depreciation differs using Modified Accelerated
Cost Recovery System (MACRS)
depreciation, straight-line depreciation, accelerated depreciation,
and units of production depreciation.
c. A marketing analyst prepares a viz to show which countries present the best opportunity for expansion to increase profits.
d. A corporate accountant is examining how much variability
there is in individual customer spending in response to a social
media campaign about company advances
in social responsibility.
e. A large conglomerate corporation operates businesses in
several different industries. The CEO wants to see how much each
industry contributes to the overall profits of
the corporation.
f. The manager of a movie theater wants to understand how attendance at his movie theater is affected by prices.
In: Finance
The managers at Melody’s Movie theater are considering whether to upgrade their film projector. The upgraded projector costs $120,000 and will last for an estimated 6 years. It will be depreciated using the 3-year MACRS schedule. The upgraded projector will have an estimated $5,000 salvage value in year 7.
The upgraded projector will replace the theater’s existing projector. The existing projector was purchased 5 years ago, for $45,000. The old projector was also depreciated using the 3-year MACRS schedule. If the old projector is replaced, it will be sold immediately (in year 0) for $20,000. If the old projector is not replaced, it will last for 6 more years, and will be sold as scrap for $1,000 in year 7.
With the new projector, Melody’s Movie theater will be able to show enhanced 3D films, and they estimate that their annual sales will increase from $200,000 per year to $260,000 per year. Total operating costs associated with the business will not be affected by the new projector. Costs will be $110,000 per year regardless of projector.
Melody’s corporate tax rate is 30%.
a. Calculate the capital spending cash flows for the project.
b. Calculate the operating cash flows for years 1 to 6.
In: Finance
For each of the following scenarios, list the purpose(s) of the visualization and the type(s) of visualization that would best fulfill the purpose(s). Justify your choice.
(a) A stock analyst is showing a potential customer how projected returns from various mutual funds will affect the size of retirement savings over time.
b. A tax accountant is showing the CFO how the accumulated
effect of asset depreciation differs using Modified Accelerated
Cost Recovery System (MACRS)
depreciation, straight-line depreciation, accelerated depreciation,
and units of production depreciation.
c. A marketing analyst prepares a viz to show which countries present the best opportunity for expansion to increase profits.
d. A corporate accountant is examining how much variability
there is in individual customer spending in response to a social
media campaign about company advances
in social responsibility.
e. A large conglomerate corporation operates businesses in
several different industries. The CEO wants to see how much each
industry contributes to the overall profits of
the corporation.
f. The manager of a movie theater wants to understand how
attendance at his movie
theater is affected by prices.
In: Accounting
"Mike Dreskin manages a large Los Angeles movie theater complex called Cinema I, II, III, and IV. Each of the four auditoriums plays a different film; the schedule is set so that starting times are staggered to avoid the large crowds that would occur if all four movies started at the same time. The theater has a single ticket booth and a cashier who can maintain an average service rate of 280 movie patrons per hour. Service times are assumed to follow an exponential distribution. Arrivals on a typically active day are Poisson distributed and average 210 per hour. To determine the efficiency of the current ticket operation, Mike wishes to examine several queue operating characteristics.
(a) Find the average number of moviegoers waiting in line to purchase a ticket.
(b) What percentage of the time is the cashier busy?
(c) What is the average time that a customer spends in the system?
(d) What is the average time spent waiting in line to get to the ticket window? (e) What is the probability that there are more than two people in the system? More than three people? More than four?"
Please use an Excel Model. (MD1?)
In: Statistics and Probability