# Java application of a circle

Write a Java application to calculate the circumference and the area of a circle. Your application must have two classes. The Circle class will have two methods: the circumference method and the area method. Each method will take a double input parameter as the value of the radius, perform its calculation, and return a double result.

The CircleTest class will have a main method that uses a JOptionPane to get the value of the radius from the user. The main method will create an object of the Circle class and test its methods. The main method will also use a JOptionPane for output. Use Math.PI and the Math.pow method in your calculations.

Limit your output to three digits after the decimal point by using the String.format method. Add exception handling to your program so that, if the user inputs something other than a string of digits, your program catches the exception and gives the user another chance to input the value of the radius.

# AP423

1. Assume that a simple random sample has been selected from a normally distributed population and test the given claim. Identify the null and alternative hypotheses, test statistic, p-value, critical value(s), and state the final conclusion that addresses the original claim.
– In a manual on how to have a number one song, it is stated that a song must be no longer to of 227.6 seconds and a standard deviation of 55.36 seconds. Use a 0.05 significance level and the accompanying minitab display to test the claim that the sample is from a population of songs with a mean greater than 210 seconds. What do these results suggest about the advice given in the manual?
Minitab display
One-sample T
Test of mu=210 vs >210
N=40
Mean = 227.60
St dev= 55.36
Se mean= 8.75
95% lower bound = 212.85
T= 2.01
P=0.026

2. A simple random sample of 59 adults is obtained from a normally distributed population, and each persons red blood cell count ( in cells per microliter) is measured. This sample mean is 5.25 and the sample standard deviation is 0.53. Use a 0.01 significance level and given calculator display to test the claim that the sample is from a population with a mean less than 5.4, which is a value often used for the upper limit of the range of normal values. What do the results suggest about the sample group?
t-test
u< 5.4
t= -2.173909174
p= 0.0169032278
x= 5.25
Sx= 0.53
N= 59
a. Identify the null and alternative hypotheses
b. Identify the statistic that is relevant to the test (type interger or decimal)
c. Identify the test statistic (round 3 decimal places)
d. Identify the p value (round 4 decimal places)
e. Find the critical values (left tailed,right or double)(round 3 decimal places)

3. For the following claim, find the null and alternative hypotheses, test statistic, p-value, critical value, and draw a conclusion. Assume that a simple random sample has been selected from a normally distributed population.
Claim: the mean IQ score of statistics professors is greater than 129.
Sample data: n=16
X=130
S=12
Significance level is a = 0.05

# AP422.docx

1. Find the net price of a computer that lists for \$460.00 if a discount rate of 10% is offered.

2. Calculate the net price of 50 boxes of computer paper if the unit price is 15.52 and a single trade discount of 40% is allowed.

3. One manufacturer needs to calculate the net price of an order with a list price of \$800 and a trade discount series of 11/9/6. Use the net decimal equivalent to find the net price.

4. One distributor lists a printer at \$450 with a trade discount series of 16/12/4. Another distributor lists the same printer at \$410 with a trade discount series of 9/9/4. Which is the better deal?

5. A man gets an invoice for \$410 with terms 2/10, 1/15, n/30. How much would he pay 8 days after invoice date?

6. A clerk received a bill for \$642 dated April 6th with sales terms of 2/10, 1/15, n/30. What is the amount due if the bill is paid on or between April 17th and April 21st?

7. A company must calculate cash discounts before paying invoices. They are paying bills on June 16th and dated June 10th with terms 3/10, n/30. If the net price of the invoices is 12296.89, what is the net amount needed to be paid. Round to the nearest cent as needed.

8. An invoice for \$910 is dated Oct 15th  and has sales terms of 2/11 ROG. The order arrives Oct 21st. How much of the bill is due if paid Nov 3rd?

9. Cost = \$45, markup = \$30. Find the selling price.

10. Cost=\$60 selling price \$138. Find markup & find the rate of markup based on cost.

11. Belts cost \$3 and sell with a markup of \$2.63. Find the selling price of the belts.

12. A lamp cost \$36 and is marked up based on costs. If the lamp cost \$99 what was the percent of the markup?

13. Battery powered massagers cost 8.50, if they are purchased for lots of 36 or more. A store purchased 48 and sells them at 40% markup based on cost. Find the selling price of each

14. cost=\$45 selling price=\$60 find the rate of the markup based on the selling price.

15. An item marked up \$27. The markup rate based on the selling price is 51%.  Find the selling price and cost. Round to the nearest cent as needed.

16. An item sells for \$56 and is reduced to sell for \$35 find the markdown amount and the rate of the markdown.

17. Selling price =\$950 reduced price=\$650. Find the markdown amount and the rate of the markdown.

18. An item sells for 5,480 and costs 3,650 what is the rate of the markup based on selling price round to the nearest tenth of a percent.