Lab 10-2:You've been hired by Yogurt Yummies to write a C++ console application that calculates and displays the cost of a customer’s yogurt purchase. Use a validation loop to prompt for and get from the user the number of yogurts purchased in the range 1-9. Then use a validation loop to prompt for and get from the user the coupon discount in the range 0-20%. Calculate the following:
● Subtotal using a cost of $3.50 per yogurt. ● Subtotal after discount
● Sale tax using rate of 6%. ● Total
Use formatted output manipulators (setw, left/right) to print the following rows:
● Yogurts purchased ● Yogurt cost ($) ● Discount (%)
● Subtotal ($) ● Subtotal after discount ($) ● Tax ($)
● Total ($)
And two columns:
● A left-justified label (including units)
● A right-justified value.
Define constants for the yogurt cost, sales tax rate, and column widths. Format all real numbers to two decimal places. Run the program with invalid and valid inputs. The output should look like this:
#include <conio.h> // For function getch()
#include <cstdlib> // For several general-purpose functions
#include <fstream> // For file handling
#include <iomanip> // For formatted output
#include <iostream> // For cin, cout, and system
#include <string> // For string data type
using namespace std;
#define t 6.0
#define Yogurt_cost 3.50
int main()
{
float Yogurts_purchased,Discount,Subtotal,after_discount,tax,total;
cout<<"Welcome to Yogurt Yummies";
cout<<"\n-------------------------\n";
while (1>0)
{
cout<<"Enter the number of yogurts purchased (1-9):";
// input the number of yougurts purchased
cin>>Yogurts_purchased;
//checking number of yougurts purchased is valid
if(Yogurts_purchased>=1 && Yogurts_purchased<=9)
break;
else
cout<<"\nError:'"<<Yogurts_purchased<<"'is an invalid number of yogurts.\n ";
}
while (1>0)
{
// input the percentage discount
cout<<"Enter the percentage discount (0-20): :";
cin>>Discount;
// checking percentage discount is valid
if(Discount>=0 && Discount<=20)
break;
else
cout<<"Error:'"<<Discount<<"' is an invalid percentage discount.\n ";
}
//evaluating the Subtotal
Subtotal=Yogurts_purchased*Yogurt_cost;
//evaluating the after discount
after_discount=Subtotal-(Subtotal*(Discount/100));
//evaluating the tax
tax=after_discount*(t/100.0);
//evaluating the total
total=tax+after_discount;
//show the values
cout<<"\n Yogurts: "<<setw(26)<<Yogurts_purchased;
cout<<"\n Yogurt cost($):"<<setw(20)<< fixed << setprecision(2)<<Yogurt_cost;
cout<<"\n Discount (%):"<<setw(22)<< fixed << setprecision(2)<<Discount;
cout<<"\n Subtotal ($):"<<setw(22)<< fixed << setprecision(2)<<Subtotal;
cout<<"\n Total after discount ($):"<<setw(10)<< fixed << setprecision(2)<<after_discount;
cout<<"\n Tax ($): :"<<setw(25)<< fixed << setprecision(2)<<tax;
cout<<"\n Total ($):"<<setw(25)<< fixed << setprecision(2)<<total;
cout<<"\n\nEnd of Yogurt Yummies";
return 0;
}
Remember that great app you wrote for Yogurt Yummies (Lab 10-2). They want you to enhance the C++ console application that calculates and displays the cost of a customer’s yogurt purchase. Now they need to process multiple sales. Do not change any logic for handling a single sale. Make the following enhancements:
● Add "v2" to the application output header and close.
● Declare and initialize overall totals including:
Number of sales.
Overall number of yogurts sold.
Overall sale amount after discount.
Overall tax paid.
Overall sale total.
● Enclose the logic for a single sale with a sentinel loop that continues to process sales until the user enters 'n'.
● After calculating sale totals, update overall totals.
● When the user enters the sentinel value ('n'), print overall totals using formatted output manipulators (setw, left/right). Run the program with invalid and valid inputs, and at least three sales. The output should look like this:
Welcome to Yogurt Yummies, v2
-----------------------------
Enter another yogurt purchase (y/n)? y
Sale 1
----------------------------------------
Enter the number of yogurts purchased (1-9): 11
Error: '11' is an invalid number of yogurts.
Enter the number of yogurts purchased (1-9): 2
Enter the percentage discount (0-20): 22
Error: '22.00' is an invalid percentage discount.
Enter the percentage discount (0-20): 4
Yogurts: 2
Yogurt cost ($): 3.50
Discount (%): 4.00
Subtotal ($): 7.00
Total after discount ($): 6.72
Tax ($): 0.40
Total ($): 7.12
Enter another yogurt purchase (y/n)? y
Sale 2
----------------------------------------
Enter the number of yogurts purchased (1-9): 5
Enter the percentage discount (0-20): 10
Yogurts: 5
Yogurt cost ($): 3.50
Discount (%): 10.00
Subtotal ($): 17.50
Total after discount ($): 15.75
Tax ($): 0.94
Total ($): 16.70
Enter another yogurt purchase (y/n)? y
Sale 3
----------------------------------------
Enter the number of yogurts purchased (1-9): 7
Enter the percentage discount (0-20): 20
Yogurts: 7
Yogurt cost ($): 3.50
Discount (%): 20.00
Subtotal ($): 24.50
Total after discount ($): 19.60
Tax ($): 1.18
Total ($): 20.78
Enter another yogurt purchase (y/n)? n
Overall totals
========================================
Sales: 3
Yogurts: 14
Total after discount ($): 42.07
Tax ($): 2.52
Total ($): 44.59
End of Yogurt Yummies, v2
In: Computer Science
You have been asked to look at production options for the Android01, since production methods and allocation of costs have implications for cost per unit. Two alternative methods of production are being considered. Begin by gathering data (using financial information in decision making), then determine the suitability of the project.
The production of Android01 will share some production facilities and service divisions with Processor01. Fixed costs are $5 million per year, and will be assigned at the rate of 30 percent to Android01 and 70 percent to Processor01.
The variable cost of the production facilities and service divisions is $25 million per year. The square footage of factory space and labor needed for the production of 500 units of Processor01 and 300 units of Android01 are listed below.
|
Square Feet |
Labor |
|
|---|---|---|
|
Processor01 (500 units) |
70,000 |
120 |
|
Android01 (300 units) |
30,000 |
80 |
The remaining cost for the production of Android01 is for components, at $25,000 per unit.
Question 1: In Method B, what would be the cost per unit of producing Android01 using factory space as the allocation basis? What would be the cost per unit using labor as the allocation basis?
Before starting on your calculations, review materials on production cost allocation.
An alternate method of assigning costs is activity-based costing.The major activities for the production of both Processor01 and Android01 are fabricator setup and component assembly. There are 500 units of Processor01 and 300 units of Android01 produced every year. There will be a total of 25,000 setups per year for at a total cost of $10 million. Each unit of Android01 will require 40 setups. There will be a total of 125,000 assemblies per year at a total cost of $15 million. Each unit of Android01 will require 180 assemblies. The remaining cost for the production of Android01 is for components, at $25,000 per unit.
Question 2: What would be the cost per unit of producing Android01 using activity-based costing?
Note that in addition to the setup costs and assemblies costs there are two more costs to add: (1) fixed costs of $5 million, which are still distributed at a rate of 30 percent to Android01 and 70 percent to Processor01, and (2) the cost of Android01 components at $25,000 per unit.
Discuss the differences in the cost per unit of Android01 using space as an allocation basis, using labor as an allocation basis, and using activity-based costing. Which method do you think is the most accurate way to assign costs?
Next, suppose IPS uses markup pricing for Android01. Fixed costs are $4.5 million, and for a level of production of 300 units, the variable cost per unit is $48,000.
Question 3: What is the price of the Android01 at 30 percent markup over full cost?
Submit your Markup Pricing Report and Calculations to the dropbox below. Submit a spreadsheet showing your calculations in Excel and provide a narrative analysis in Word. Your narrative analysis should summarize the results of your analysis and make recommendations for the benefit of company.
In: Accounting
The following data from the just completed year are taken from the accounting records of Mason Company:
| Sales | $ | 651,000 |
| Direct labor cost | $ | 84,000 |
| Raw material purchases | $ | 136,000 |
| Selling expenses | $ | 103,000 |
| Administrative expenses | $ | 46,000 |
| Manufacturing overhead applied to work in process | $ | 205,000 |
| Actual manufacturing overhead costs | $ | 222,000 |
| Inventories | Beginning | Ending | ||
| Raw materials | $ | 8,700 | $ | 10,400 |
| Work in process | $ | 5,200 | $ | 20,200 |
| Finished goods | $ | 75,000 | $ | 25,100 |
Required:
1. Prepare a schedule of cost of goods manufactured. Assume all raw materials used in production were direct materials.
2. Prepare a schedule of cost of goods sold. Assume that the company's underapplied or overapplied overhead is closed to Cost of Goods Sold.
3. Prepare an income statement.
Prepare a schedule of cost of goods manufactured. Assume all raw materials used in production were direct materials.
Prepare a schedule of cost of goods manufactured. Assume all raw materials used in production were direct materials.
|
||||||||||||||||||||||||||||||||||||||||||||||
Prepare a schedule of cost of goods sold. Assume that the company's underapplied or overapplied overhead is closed to Cost of Goods Sold.
|
|||||||||||||||||||
Prepare an income statement.
|
||||||||||||||||||||||||||||
In: Accounting
| Sales | $ | 652,000 |
| Direct labor cost | $ | 86,000 |
| Raw material purchases | $ | 136,000 |
| Selling expenses | $ | 101,000 |
| Administrative expenses | $ | 44,000 |
| Manufacturing overhead applied to work in process | $ | 208,000 |
| Actual manufacturing overhead costs | $ | 222,000 |
| Inventories | Beginning | Ending | ||
| Raw materials | $ | 8,700 | $ | 10,200 |
| Work in process | $ | 5,800 | $ | 20,900 |
| Finished goods | $ | 74,000 | $ | 25,800 |
1. Prepare a schedule of cost of goods manufactured. Assume all raw materials used in production were direct materials.
2. Prepare a schedule of cost of goods sold. Assume that the company's underapplied or overapplied overhead is closed to Cost of Goods Sold.
3. Prepare an income statement.
|
|||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||
Prepare an income statement.
|
||||||||||||||||||||||||||||
In: Accounting
Suppose that the potential customers for hair braiding in a city believe that all hair braiding is identical and that the market is perfectly competitive. Hair braiding requires special skills so the supply of workers in this industry is upward-sloping, and the wages earned by hair braiders increase as the industry output increases. (Total 12 Marks)
Firms in this market face the following total cost:
TC = Q3 ?8Q2 + 20Q + W
where Q is the number of hair braidings and W is the daily wage paid to workers. The wage, which depends on total industry output, equals W = 0.1NQ, where N is the number of ?rms. Market demand is:
QD = 500?20P
(a) How does average total cost for the ?rm change as industry output increases and what does this imply for industry’s long-run supply curve?
(b) Calculate the long-run equilibrium output for each ?rm.
(c) Explain how the long-run equilibrium price changes as the number of ?rms increases?
(d) Calculate the long-run equilibrium number of ?rms and total industry output.
(e) Calculate the long-run equilibrium price.
In: Economics
As the manager of restaurant, you estimate the total product of labor used to cook metals. Use these data to calculate the marginal product of labor
| Quantity of Labor | Total Product | Marginal Product |
| 0 | 0 | |
| 1 | 20 | |
| 2 | 45 | |
| 3 | 65 | |
| 4 | 80 | |
| 5 | 90 |
-What effect does the law of diminishing marginal returns have on these schedules? What underlies the law of diminishing the marginal returns?
2As a result of increasing student population at the University of Pittsburg the nearby Pizza Hut restaurant is realizing record sales. It is considering adding a new ovem to bake additional pizzas. However, the daytime supervisor recommends simply employing more workers. How should the manager decide which course of action to take?
-Suppose that a perfectly competitive firm sells 300 batteries at $10 each. At this output, the firm's total variable cost is $1,800 and its total fixed cost is $600. Calculate the firm's profit per unit and total profit from this information.
-Why does the market system provide goods such as Pepsi-Cola, while the govenment provides goods such as highways and lighthouses?
In: Economics
In 20x0, the Tyra Corporation obtained the mining rights for a property in Northern Ontario for
$10,000,000. During the year 20x0, Tyra invested another $5,000,000 to build the infrastructure
of the mine. The mine became operational on December 31, 20x0. Tyra expects that the mine
will be operational for 15 years after which the site will have to be restored at a cost of
$8,000,000. The total output of the mine is expected to be 500,000 tonnes of ore. Tyra will be
using the units of production method of depreciation for both the mining rights and the
infrastructure.
Required –
a) During 20x1 and 20x2, the total tonnes of ore mined was 27,300 and 36,000 respectively.
Assuming a discount rate of 5%, prepare all journal entries for the years ended December
31, 20x0, 20x1 and 20x2.
b) In 20x8, Tyra estimates that the total output of the mine will be 450,000 tonnes and that
the mine will be closing on December 31, 20x12. The cost to restore the site is now
estimated to be $8,500,000. Total tonnes mined to December 31, 20x7 was 210,000
tonnes. A total of 31,000 tonnes were extracted in 20x8. Assuming a discount rate of 4%,
prepare all journal entries for the year ended December 31, 20x8.
In: Accounting
Q73. the price is 3, the quantity demanded is 8. When the price is 6, the quantity demanded is 4. What is the price elasticity of When demand? -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Q74. A perfectly inelastic demand curve will be ---------------- on a graph while a perfectly elastic demand curve will be ------------------on a graph. a. vertical; horizontal b. horizontal; vertical c. vertical; vertical d. horizontal; horizontal
Q75. When demand is price-inelastic, a price decrease will result in:
a. an increase in total cost. b. an increase in total revenue. c. a decrease in total cost. d. a decrease in total revenue.
Q76. The practice of charging different prices to different buyers is called:
a. total revenue. b. price discrimination. c. price elasticity. d. an increase in demand.
Q77. A percentage change in quantity supplied divided by a percentage change in price is called:
a. income elasticity. b. price elasticity of demand. c. price elasticity of supply. d. elasticity of substitution.
Q78. When governments restrict agricultural production, the supply curve to shifts to the ----------, the equilibrium price ---------------, and the result is --------------------------------- revenue for farmers.
a. right; decreases; higher b. left; decreases; higher c. left; increases; lower d. left; increases; higher
In: Economics
For parts a, b, and c, below, please assume that the government wants to preserve 1200 units of land from these two landowners, that is, q1 + q2 = 1200.
In: Economics
Thompson Motors specializes in producing one specialty vehicle. It is called Turner and is styled to easily fit multiple surfboards in its back area and top-mounted storage racks. Thompson has the following manufacturing costs:
Plant management costs, $1,200,000 per year
Cost of leasing equipment, $1,300,000 per year
Workers’ wages, $700 per Surfer vehicle produced
Direct materials costs: Steel, $1,500 per Turner, Tires, $125 per tire, each Turner takes 5 tires (one spare).
City license, which is charged monthly based on the number of tires used in production:
0 – 500 tires $50,000
501 – 1,000 tires $74,500
More than 1,000 tires $200,000
Thompson currently produces 110 vehicles per month.
In: Accounting