| Hardened steel blanks | |
| (used for knife shaft and blade) | $4.00 |
| Wood (for handle) | 1.55 |
| Packaging | 0.45 |
| Number of customers (stores) | 58,500 |
| Number of knives sold | 1,135,000 |
| Wholesale price (to store) per knife | $16 |
| Required: | |||
| A. | Prepare an annual income statement for the Kitchen Ninja knife series, including supporting calculations, from the information provided. Refer to the list of Amount Descriptions for exact wording of the answer choices for text entries.* | ||
| B. |
Determine the balances in the work in process
and finished goods inventories for the Kitchen Ninja knife series
on December 31, 2016.*
|
In: Accounting
|
Externalities Assignment |
The purpose of this assignment is to assess your understanding of economic externalities, public goods and how they are paid for. Write a 1 to 1.5 page (500-750 words) essay. In your paper, discuss the definition of externality, why government intervention is usually required to address the economic failure that results, and how taxes are used to fund this.
Use your textbook and at least one other reliable source to find information. The online library or Google Scholar are both good options.
Structure your paper as follows:
Content requirements: (3 points)
Writing mechanics: (6 points)
In: Economics
JAVA programming - please answer all prompts as apart of 1 java assignment.
Part A
Create a java class InventoryItem which has
Provide a copy constructor in addition to other constructors. The copy constructor should copy description and price but not howMany, which defaults to 1 instead. In all inheriting classes, also provide copy constructors which chain to this one.
Write a clone method that uses the copy constructor to create a copy. Create similar clone methods in all classes in this assignment.
Write a toString for this class that returns something like "Footo the Wonder Boot Exploder ($22.99)" (leave out howMany)
Also write an equals method for this class. InventoryItems can only be equal to other InventoryItems, and only if they have the same price and description (even if howMany is different). Note how the equals method agrees with the copy constructor about what it means for two InventoryItems to be the same.
Add a method view(), that prints something like "Viewing: Footo the Wonder Boot Exploder"
In a harness class with a main, create several InventoryItems, clone them, and check that equals works properly.
Part B
Create a class Book which inherits from InventoryItem and also has a String author (Book will use description to hold the book's title). toString for this class will return something like "Book: The Curse of the Flying Wombat by Constance deCoverlet ($12.95)".
For Book, override view() to print something like "Opening Book Exerpt: The Curse of the Flying Wombat"
Also override equals to require author is the same, in addition to the requirements in the superclass (chain the equals methods together).
Create a class MusicCD which inherits from InventoryItem and also has a String performer (it will use description to hold the CD's title). toString for this class will return something like "CD: Tommy Gnosis: Greatest Hits ($18.65)"
For MusicCD override view() to print something like "Now Playing Sample: Greatest Hits".
Also override equals to require performer is the same, in addition to the requirements in the superclass.
In your main, create more InventoryItem variables, but point them at a Book and a MusicCD. Use clone to make copies of each type and make sure this works. Check that equals works properly.
In: Computer Science
Spreadsheet and Statement of Cash Flows
The following information was taken from Lamberson Company's accounting records:
|
Account Balances |
||
|
Account Titles |
January 1, |
December 31, |
|
Debits |
||
|
Cash |
$ 1,400 |
$ 2,400 |
|
Accounts Receivable (net) |
2,800 |
2,690 |
|
Marketable Securities (at cost) |
1,700 |
3,000 |
|
Allowance for Change in Value |
500 |
800 |
|
Inventories |
8,100 |
7,910 |
|
Prepaid Items |
1,300 |
1,710 |
|
Investments (long-term) |
7,000 |
5,400 |
|
Land |
15,000 |
15,000 |
|
Buildings and Equipment |
32,000 |
46,200 |
|
Discount on Bonds Payable |
— |
290 |
|
$69,800 |
$85,400 |
|
|
Credits |
||
|
Accumulated Depreciation |
$16,000 |
$16,400 |
|
Accounts Payable |
3,800 |
4,150 |
|
Income Taxes Payable |
2,400 |
2,504 |
|
Wages Payable |
1,100 |
650 |
|
Interest Payable |
— |
400 |
|
Note Payable (long-term) |
3,500 |
— |
|
12% Bonds Payable |
— |
10,000 |
|
Deferred Taxes Payable |
800 |
1,196 |
|
Convertible Preferred Stock, $100 par |
9,000 |
— |
|
Common Stock, $10 par |
14,000 |
21,500 |
|
Additional Paid-in Capital |
8,700 |
13,700 |
|
Unrealized Increase in Value of Marketable Securities |
500 |
800 |
|
Retained Earnings |
10,000 |
14,100 |
|
$69,800 |
$85,400 |
|
Additional information for the year:
a.
|
Sales |
$ 39,930 |
|
|
Cost of goods sold |
(19,890) |
|
|
Depreciation expense |
(2,100) |
|
|
Wages expense |
(11,000) |
|
|
Other operating expenses |
(1,000) |
|
|
Bond interest expense |
(410) |
|
|
Dividend revenue |
820 |
|
|
Gain on sale of investments |
700 |
|
|
Loss on sale of equipment |
(200) |
|
|
Income tax expense |
(2,050) |
|
|
Net income |
$ 4,800 |
b. Dividends declared and paid totaled $700.
c. On January 1, 2016, convertible preferred stock that had originally been issued at par value were converted into 500 shares of common stock. The book value method was used to account for the conversion.
d. Long-term nonmarketable investments that cost $1,600 were sold for $2,300.
e. The long-term note payable was paid by issuing 250 shares of common stock at the beginning of the year.
f. Equipment with a cost of $2,000 and a book value of $300 was sold for $100. The company uses one Accumulated Depreciation account for all depreciable assets.
g. Equipment was purchased at a cost of $16,200.
h. The 12% bonds payable were issued on August 31, 2016, at 97. They mature on August 31, 2026. The company uses the straight-line method to amortize the discount.
i. Taxable income was less than pretax accounting income, resulting in a $396 increase in deferred taxes payable.
j. Short-term marketable securities were purchased at a cost of $1,300. The portfolio was increased by $300 to a $3,800 fair value at year-end by adjusting the related allowance account.
Required
1. Prepare a spreadsheet to support Lamberson Company's 2016 statement of cash flows. Use the minus sign to indicate cash outflows, a decrease in cash or cash payments.
1. Prepare the statement of cash flows.
|
LAMBERSON COMPANY |
||
|
Operating Activities: |
||
|
Net income |
$ |
|
|
Adjustment for noncash income items: |
||
|
Add: Depreciation expense |
|
|
|
Add: Bond discount amortization |
|
|
|
Add: Loss on sale of equipment |
|
|
|
Add: Increase in deferred taxes payable |
|
|
|
Less: Gain on sale of investments |
|
|
|
Adjustments for cash flow effects from working capital items: |
||
|
Decrease in accounts receivable |
|
|
|
Decrease in inventories |
|
|
|
Increase in prepaid items |
|
|
|
Increase in accounts payable |
|
|
|
Decrease in wages payable |
|
|
|
Increase in income taxes payable |
|
|
|
Increase in interest payable |
|
|
|
Net cash provided by operating activities |
$ |
|
|
Investing Activities: |
||
|
Payment for purchase of short-term marketable securities |
$ |
|
|
Proceeds from sale of long-term investments |
|
|
|
Proceeds from sale of equipment |
|
|
|
Payment for purchase of equipment |
|
|
|
Net cash used for investing activities |
|
|
|
Financing Activities: |
||
|
Proceeds from issuance of 12% bonds |
$ |
|
|
Payment of dividends |
|
|
|
Net cash provided by financing activities |
|
|
|
Net increase in cash |
$ |
|
|
Cash, January 1, 2016 |
|
|
|
Cash, December 31, 2016 |
$ |
|
2. Compute the cash flow from operations to sales ratio and the profit margin ratio for 2016. Round your answers to one decimal place.
a. Cash flows from operations ratio :%
b. Profit margin: %
In: Accounting
Income statements and balance sheets follow for The New York Times Company. Refer to these financial statements to answer the requirements.
|
The New York Times Company Consolidated Statements of Income |
||
|
Fiscal year ended |
||
|
(in thousands) |
Dec. 29, 2016 |
Dec. 30, 2015 |
|
Revenues |
||
|
Circulation |
$ 880,543 |
$ 851,790 |
|
Advertising |
580,732 |
638,709 |
|
Other |
94,067 |
88,716 |
|
Total revenues |
1,555,342 |
1,579,215 |
|
Production costs |
||
|
Wages and benefits |
363,051 |
354,516 |
|
Raw materials |
72,325 |
77,176 |
|
Other |
192,728 |
186,120 |
|
Total production costs |
628,104 |
617,812 |
|
Selling, general and administrative costs |
721,083 |
713,837 |
|
Depreciation and amortization |
61,723 |
61,597 |
|
Total operating costs |
1,410,910 |
1,393,246 |
|
Restructuring charge |
14,804 |
0 |
|
Multiemployer pension plan withdrawal expense |
6,730 |
9,055 |
|
Pension settlement charges |
21,294 |
40,329 |
|
Early termination charge |
0 |
0 |
|
Operating profit |
101,604 |
136,585 |
|
Loss from joint ventures |
(36,273) |
(783) |
|
Interest expense, net |
34,805 |
39,050 |
|
Income from continuing operations before income taxes |
30,526 |
96,752 |
|
Income tax expense/(benefit) |
4,421 |
33,910 |
|
Income from continuing operations |
26,105 |
62,842 |
|
Loss from discontinued operations, net of income taxes |
(2,273) |
0 |
|
Net income |
23,832 |
62,842 |
|
Net loss attributable to the noncontrolling interest |
5,236 |
404 |
|
Net income attributable to The New York Times Company common stockholders |
$29,068 |
$63,246 |
Continued next page
The New York Times Company Consolidated Balance Sheets |
||
|
As of |
||
|
(in thousands) |
Dec. 29, 2016 |
Dec. 30, 2015 |
|
Cash and cash equivalents |
$ 100,692 |
$ 105,776 |
|
Short-term investments |
449,535 |
507,639 |
|
Accounts receivable, net |
197,355 |
207,180 |
|
Prepaid assets |
15,948 |
19,430 |
|
Other current assets |
32,648 |
22,507 |
|
Total current assets |
796,178 |
862,532 |
|
Long-term marketable securities |
187,299 |
291,136 |
|
Investments in joint ventures |
15,614 |
22,815 |
|
Property plant and equipment, net |
596,743 |
632,439 |
|
Goodwill |
134,517 |
109,085 |
|
Deferred income taxes |
301,342 |
309,142 |
|
Miscellaneous assets |
153,702 |
190,541 |
|
Total assets |
$2,185,395 |
$2,417,690 |
|
Accounts payable |
$ 104,463 |
$ 96,082 |
|
Accrued payroll and other related liabilities |
96,463 |
98,256 |
|
Unexpired subscriptions |
66,686 |
60,184 |
|
Current portion of long-term debt |
0 |
188,377 |
|
Accrued expenses and other |
131,125 |
120,686 |
|
Total current liabilities |
398,737 |
563,585 |
|
Long-term debt and capital lease obligations |
246,978 |
242,851 |
|
Pension benefits obligation |
558,790 |
627,697 |
|
Postretirement benefits obligation |
57,999 |
62,879 |
|
Other |
78,647 |
92,223 |
|
Total other liabilities |
942,414 |
1,025,650 |
|
Stockholders’ equity |
||
|
Common stock of $0.10 par value |
||
|
Class A common stock |
16,921 |
16,826 |
|
Class B convertible stock |
82 |
82 |
|
Additional paid-in capital |
149,928 |
146,348 |
|
Retained earnings |
1,331,911 |
1,328,744 |
|
Common stock held in treasury, at cost |
(171,211) |
(156,155) |
|
Accumulated other comprehensive loss, net of tax |
(479,816) |
(509,094) |
|
Total New York Times Company stockholders’ equity |
847,815 |
826,751 |
|
Noncontrolling interest |
(3,571) |
1,704 |
|
Total stockholders’ equity |
844,244 |
828,455 |
|
Total liabilities and stockholders’ equity |
$2,185,395 |
$2,417,690 |
Continued next page
Required:
a. Compute net operating profit after tax (NOPAT) for 2016 and 2015. Compute net operating assets (NOA) for 2016 and 2015. Assume that combined federal and state statutory. Compute return on net operating assets (RNOA) for 2016 and 2015. Net operating assets are $397,299 thousand in 2014.
b. Compute return on common shareholders equity (ROE) for 2016 and 2015. Stockholders’ equity attributable to New York Times Company in 2014 is $726,328 thousand.
c. What is nonoperating return component of ROE for 2016 and 2015?
d. Comment on the difference between ROE and RNOA. What inference do you draw from this comparison?
Please Show Work - Excel or Word Answer is Prefered.
|
2016 |
2015 |
||
|
EBIT |
|||
|
Tax Rate |
|||
|
Taxes |
|||
|
Net Operating Profit After Tax |
|||
|
Net Operating Asset Calculations |
|||
|
2016 |
2015 |
2014 |
|
|
Operating Assets Total Assets (Cash + Short Term Inv. + Marketable Securities) |
|||
|
Operating Liabilities Total Liabilities (Short Term + Long Term Notes) |
|||
|
NOA |
|||
|
Equity |
|||
|
Net Income |
|||
|
Return on NOA |
|||
|
ROE |
|||
In: Accounting
In: Computer Science
Pre-lab Activities
Step 1. Observation. Write down something surprising that you noticed this week and you don’t understand. NOTE: if you can’t think of anything interesting that happened this week, you may use an example from any part of your life.
EXAMPLE: This morning I woke up and there was a dead raccoon on my front doorstep!
Observation(s):
This morning I woke up and the tree in me from the yard had fallen over.
Step 2 Question. Write down a question that you have about the observation from step one (what more would you like to know about what was observed?).
HINTS: As a rule, you want to think like a reporter and ask factual cause and effect questions – questions that begin with what, when, where, why or how. More subjective questions (e.g. concerning morality) may be better addressed by the application of philosophical or ethical principles and may be difficult (or impractical) to address using science alone. Aim for a question that is likely to have a definitive answer (even though you don’t know what the answer is). The more specific you make your question, the easier it may be to test.
EXAMPLE: What caused the raccoon to die?
Question(s):
What caused the tree to fall over?
When did the tree fall over?
Why did the tree fall over?
Step 3 Hypothesis. Propose an explanation for the observation. A hypothesis must be something that can be tested. IMPORTANT: you do not know ahead of time if this explanation is correct – the beauty of science is that even if your hypothesis is wrong that is OK!! It is often wise to initially create as many reasonable hypotheses (i.e. possible explanations) as you can and to start by testing the one you think is most likely to be true.
EXAMPLE: The raccoon had rabies.
Hypothesis:
The roots of the tree were damaged/weak causing the tree to fall.
Heavy winds last night caused the tree to fall.
Step 4 Investigation. Next design a way to test if your hypothesis is correct or incorrect. One way is to think about the implications of your hypothesis and use it to make predictions that can be tested. NOTE: you do not need to have the expertise to do the test you propose if it is possible. This is just a hypothetical scenario.
EXAMPLE: IF the raccoon died of rabies, THEN it should still have antibodies against the rabies virus in its bloodstream. TO TEST THIS, WE COULD test the raccoon’s blood.
Predictions of a hypothesis (IF… THEN…), and ways to test it (TO TEST THIS WE COULD…):
Step 5 Analysis
Normally you would conduct the experiment in step 4 and collect data. Discuss what data you might collect from your test(s) and how you would interpret it – remember you are trying to collect information that allows you to answer a question; try to think of all the possible results you might get from your test.
EXAMPLE: The raccoon’s blood test could come back positive indicating that it did have rabies, or it could be negative indicating that it died of other causes.
Analysis (POSSIBLE RESULT “X” WOULD MEAN…; POSSIBLE RESULT “Y” WOULD MEAN…):
Step 6 Conclusion
This is where you decide if, based on your data, your hypothesis is accepted or rejected. If accepted, we may want to run the test again or make new predictions and design new tests to verify that our hypothesis is supported. If rejected, may want to modify it or generate a different hypothesis. We don’t have real data yet so now let’s pretend the hypothesis is rejected. Come up with an alternative hypothesis.
EXAMPLE: If we find the rabies test was negative, this would mean our hypothesis is rejected. Another hypothesis that we could test is whether the raccoon was killed by an animal and dragged onto the porch.
Conclusion:
In order to make scientific investigations meaningful and to minimize bias, scientists must use well-designed experiments. It is vital to be aware of variables that could impact the results, use standards (i.e. controls) in order to validate results and keep an open mind to the possibility that a hypothesis may be supported or rejected.
The following scenario will be used to illustrate how variables, controls, and experimental design can be properly implemented in an experimental setting. Refer to this scenario to answer the questions below.
A team of doctors wants to find out if the daily consumption of olive oil affects breast cancer rates in women. Rationale: Olive oil contains oleic acid, a monounsaturated fat that lowers the levels of a protein produced by a breast cancer gene in women (Her-2/neu). The doctors hypothesize that increased consumption of olive oil will reduce the incidence of breast cancer in women.
Independent variable: a factor that is expected to cause an effect; manipulated by the experimenter.
Dependent variable: a factor that changes as a result of the independent variable; a factor that you will measure.
Controlled variables: things that could interfere with experimental results; must stay the same for all groups in your experiment! There are often many controlled variables for an experiment.
In addition to determining the independent, dependent and controlled variables for an experiment, the scientist must also determine exactly how to set up the experiment. This is called experimental design.
Experimental groups: individuals/subjects that experience the manipulated independent variable. An experiment might have just one experimental group or it could have multiple experimental groups.
Control group: Don’t confuse this with controlled variables! The control group consists of individuals/subjects that do not experience the manipulated independent variable. The control group allows for a conclusion that changes in the experimental group(s) caused by independent variables.
Lab Activity: Isopod food and smell preferences?
You will now proceed to apply the concepts you have learned to design your own scientific investigation. The subjects you will study are isopods (also known as pill bugs, potato bugs and sow bugs). You will work as a group to test the smell or food preferences of isopods. Be gentle while handling these animals since these are your experimental subjects and you do not want them to die. We also have a limited supply of pill bugs.
Figure 1: Isopods are a type of arthropod. Arthropods are animals that have jointed legs and an exoskeleton. Other arthropods include insects, spiders, and crabs. Isopods typically feed on decaying matter and sometimes live plants. Their bodies are dark gray to white and divided into a head, thorax, and abdomen. The abdomen is subdivided into seven segments, and they have seven pairs of walking legs. Isopods are often found in dark, moist places because they hide from predators and because they breathe through gills, which must be kept moist in order to exchange gasses with the surrounding air.
This is one question, for experiment Overview.
Working as a group, design an experiment to determine the food or
smell preferences for the isopods. You will have several
possibilities to choose from including food choice (crackers, cat
food, apple) and smell preferences (various essential oils and
spices).
The experiments will be carried out in an apparatus made of multiple experimental chambers connected by openings that allow the isopods to move from one to the next. You should give the isopods 2 options, placing one in each experimental chamber as shown below. In this investigation, you will be using a control chamber rather than a control group. The control chamber will not have any options placed in it and will serve as a reference to compare the preferences of the isopods. Designate the small middle chamber as the control chamber.
Using 10 isopods, you will give the isopods free access to all chambers for 10 minutes. Every minute, you will count how many isopods are in each chamber.
Experimental chamber 1 with Option 1 control Experimental chamber 2 with Option 2
1. Design your experiment; complete the chart below for your experiment:
What question are you trying to answer with your experiment?
State your hypothesis.
If your hypothesis is correct, what do you predict will happen?
Independent variables (what you are testing)
Dependent variable (what you are measuring)
Controlled factors (things that are the same for all
chambers)
Graph. Vertical horizontal
What is the control for this experiment?
2. Set up your experiment. Obtain one chamber apparatus with 2 experimental chambers and a middle section. Place the options you are testing in separate chambers of the apparatus and place nothing into the small middle chamber.
When placing the options in the experimental chambers, follow
these guidelines:
a. Use small amounts of material placed throughout the
experimental chamber rather than in one pile in the middle.
b. Chop or grind food options so that the food is
accessible to the small isopods.
c. Control for the amount of material used. Use the
scales to weigh out equal amounts of each option to place in each
experimental chamber.
3. Obtain ten (10) isopods from the instructor and place them in the control (middle) chamber. Use the supplied gates to block access to the experimental chambers. Cover the control chamber with the supplied lid for 5 minutes to allow the isopods to acclimate to their new environment. Be sure to place the lids on the experimental chambers before starting your experiment.
4. After the acclimation period, track the isopods movement every minute for a total duration of 10 minutes. Record the number of isopods in each chamber at each time point in the table provided below.
Table of # isopods in each experimental chamber:
Time (min) 0, 1, 2 , 3 ,4 ,5, 6, 7, 8, 9, 10
Control
Option 1:
Option 2:
5. After the 10-minute experimental period is over, carefully remove the isopods from the experimental apparatus and return them (gently!) to their terrarium.
6. Clean up your experiment including cleaning out, drying and putting away the experimental apparatus. Throw away ground-up or chopped up food options as well as used filter paper.
7. On the following page, make a bar graph of your results.
a. Graph the number of isopods on the vertical (y)
axis and the time (minutes) on the horizontal (x) axis.
b. Your graph should include a title, labeled axes, and
a legend.
Graph. Vertical horizontal
1to 10 vertical # of isopods chamber.
1to 10 horizontal minutes.
Post Lab questions:
1. Based on your data, do you accept or reject your hypothesis? State your findings and refer to your actual data. If your hypothesis was rejected or if your data was inconclusive, that’s ok! It happens all the time in science and is part of the process (although not discussed much).
2. If you were to do this experiment again, what would you change about your experimental design? What would you keep the same?
In: Biology
Draw a UML diagram for the classes.
Code for UML:
// Date.java
public class Date {
public int month;
public int day;
public int year;
public Date(int month, int day, int year) {
this.month = month;
this.day = day;
this.year = year;
}
public Date() {
this.month = 0;
this.day = 0;
this.year = 0;
}
}
//end of Date.java
// Name.java
public class Name {
public String fname;
public String lname;
public Name(String fname, String lname) {
this.fname = fname;
this.lname = lname;
}
public Name() {
this.fname = "";
this.lname = "";
}
}
//end of Name.java
// Address.java
public class Address {
public String street ;
public String state ;
public String city;
public int zipcode;
public Address(String street, String state, String
city, int zipcode) {
this.street = street;
this.state = state;
this.city = city;
this.zipcode = zipcode;
}
public Address() {
this.street = "";
this.state = "";
this.city = "";
this.zipcode = 0;
}
}
//end of Address.java
// Employee.java
public class Employee {
public int number;
public Date mydate;
public Address myadress;
public Name myname;
public Employee(int number, Name myname, Date
mydate, Address myadress) {
this.number = number;
this.mydate = mydate;
this.myadress = myadress;
this.myname = myname;
}
public Employee() {
this.number = 0;
this.mydate = new Date();
this.myadress = new Address();
this.myname = new Name();
}
// method to display the details of the Employee
public void display()
{
System.out.println("Number:
"+number);
System.out.println("Name:
"+myname.fname+" "+myname.lname);
System.out.println("Data:
"+mydate.month+"/"+mydate.day+"/"+mydate.year);
System.out.println("Address:
"+myadress.street+" "+myadress.city+", "+myadress.state+",
"+myadress.zipcode);
}
}
// end of Employee.java
// SalariedEmployee.java
public class SalariedEmployee extends Employee
{
public double salary;
// parameterized constructor
public SalariedEmployee(int number, Name myname, Date
mydate, Address myadress, double salary)
{
super(number, myname, mydate,
myadress); // call Employee's constructor
this.salary = salary;
}
// default constructor
public SalariedEmployee()
{
super();
this.salary = 0;
}
// override Employee's display method to display the
additional details
public void display()
{
super.display();
System.out.printf("Salary:
$%,.2f\n",salary);
}
}
//end of SalariedEmployee.java
// HourlyEmployee.java
public class HourlyEmployee extends Employee
{
public double pay_rate;
public int hours_worked;
public double earnings;
// parameterized constructor
public HourlyEmployee(int number, Name myname, Date
mydate, Address myadress, double pay_rate, int hours_worked)
{
super(number, myname, mydate,
myadress);
this.pay_rate = pay_rate;
this.hours_worked =
hours_worked;
// calculate earnings
if(hours_worked <= 40) // no
overtime
earnings =
this.pay_rate*this.hours_worked;
else // overtime
earnings =
this.pay_rate*40 + (this.hours_worked-40)*1.5*this.pay_rate;
}
// default constructor
public HourlyEmployee()
{
super();
pay_rate = 0;
hours_worked = 0;
earnings = 0;
}
// override display method
public void display()
{
super.display();
System.out.printf("Pay rate:
$%,.2f\n",pay_rate);
System.out.println("Hours Worked:
"+hours_worked);
System.out.printf("Earnings:
$%,.2f\n",earnings);
}
}
//end of HourlyEmployee.java
// Employeeinfo.java
public class Employeeinfo {
public static void main(String[] args)
{
// create SalariedEmployee
SalariedEmployee s = new
SalariedEmployee(12, new Name("Shaun","Marsh"), new Date(11, 7,
1995), new Address("Street1","State1","City1",70081), 75000);
// create HourlyEmployee without
any overtime
HourlyEmployee h1 = new
HourlyEmployee(15, new Name("Harry","Doe"), new Date(7, 16, 2000),
new Address("Street2","State2","City2",60181), 45.75, 35);
// create HourlyEmployee with
overtime
HourlyEmployee h2 = new
HourlyEmployee(25, new Name("Jerry","Hope"), new Date(10, 16,
2007), new Address("Street3","State3","City3",80111), 45.75,
45);
// display the details
s.display();
System.out.println();
h1.display();
System.out.println();
h2.display();
}
}
//end of Employeeinfo.java
In: Computer Science
Write a C program that prompts the user to enter some information about up to 20 individuals (think of a way to welcome and prompt the user). It must be stored in a structure. Once data is entered, the program output it as shown in sample run below. Your program should include a structure with a tag name of: “information”. It should contain the following data as members: a struct to store employee's name, defined as: struct name fullname e.g. a float to store employee's pay_rate, a float to store employee's hours, a float to store employee's retirement percentage, a struct to store a hire date, defined as: struct date the data type struct name will consist of: char last_name[20]; char first name [15]; char middle initial[1]; and the data type struct date: int yyyy; int mm; int dd; You need to define an array of type: struct information. You can call this array: employees[20] or whatever name you wish. Use a 21% tax rate. The dialog with the user must be as follows:
Whatever Title you want Here
How many employees do you wish to process? 2
Employee #1: Enter first name: Minnie
Enter last name: Mouse
Enter middle initial:
Enter hours worked: 40
Enter pay_rate: 33.50
Enter 401K percentage:.03
Enter hire date (mm/dd/yyyy): 01/02/1993
Employee #2:
Enter first name: Johnny
Enter last name: Carson
Enter middle initial: M Enter hours worked: 30
Enter pay_rate:
50 Enter 401K percentage: .025
Enter hire date (mm/dd/yyyy): 11/10/1942 /
*After the entries a report will come out. You may design it yourself or use this sample as a template. Make sure decimals align!! */
Jim's Employees Payroll Report – 9/22/2020 --------------------------------------------------------
Name Hire Date Hrs Rate Gross Pay Taxes 401K Net Pay Mouse Minnie 01/02/1993 40.00 33.50 1340.00 281.40 40.20 1018.40 Johnny M Carson 11/17/1942 30.00 50.00 1500.00 315.00 37.50 1147.50 Total Payroll 70.00 83.50 2840.00 596.40 77.70 2165.90 Note:
The black text represents the "output" from your program and is shown for clarity only here. Also note that what the user types in is indicated by the blue area above. I also did not show examples of data validation – which you can handle in your own way. Hints/other requirements: • Use safer_gets to read in character array data. • You should use %di (instead of %i) as the format specifier for the date fields because if you enter an integer item starting with the number 0 (zero), C will interpret that number as "octal", which will cause erroneous results. For this reason, I recommend that you use %d in the scanf statement when prompting the user for any int type data. • You do not need to use user-defined functions or string functions in this program (however, feel free to if you'd like to). • You are not permitted to use pointers in this program. (That will be in another assignment!) • You may use some string functions from the notes and chat sessions • You need to perform validation on all the fields entered except the name. • The date can have any label you wish, like birth date, hire date, etc. • For 3 points extra credit you can have the report the current date. Good luck! (Carry On by Crosby, Stills, Nash & Young plays in the background…) (my apologies for any typos found in the description above)
In: Computer Science
Write a C program that prompts the user to enter some information about up to 20 individuals (think of a way to welcome and prompt the user). It must be stored in a structure. Once data is entered, the program output it as shown in sample run below.
Your program should include a structure with a tag name of: “information”. It should contain the following data as members:
a struct to store employee's name, defined as: struct name
fullname e.g. a float to store employee's pay_rate,
a float to store employee's hours,
a float to store employee's retirement percentage,
a struct to store a hire date, defined as:
the data type struct name will consist of: char
last_name[20];
char first name [15];
char middle initial[1];
and the data type struct date: int yyyy;
int mm;
int dd;
struct date
You need to define an array of type: struct information.
You can call this array: employees[20] or whatever name you wish.
Use a 21% tax rate. The dialog with the user must be as
follows:
Whatever Title you want Here
How many employees do you wish to process? 2
Employee #1:
Enter first name: Minnie
Enter last name: Mouse
Enter middle initial:
Enter hours worked: 40
Enter pay_rate: 33.50
Enter 401K percentage: .03
Enter hire date (mm/dd/yyyy): 01/02/1993
Employee #2:
Enter first name: Johnny Enter last name: Carson Enter middle
initial: M
Enter hours worked: 30
Enter pay_rate: 50
Enter 401K percentage: .025
Enter hire date (mm/dd/yyyy): 11/10/1942
/*After the entries a report will come out. You may design it yourself or use this sample as a template. Make sure decimals align!! */
Name
MouseMinnie Johnny M Carson
Total Payroll
Jim's Employees Payroll Report – 9/22/2020 --------------------------------------------------------
Hire Date Hrs Rate Gross Pay Taxes 401K Net Pay
01/02/1993 40.00 33.50 1340.00 281.40 40.20 1018.40 11/17/1942 30.00 50.00 1500.00 315.00 37.50 1147.50
70.00 83.50 2840.00 596.40 77.70 2165.90
Note: The black text represents the "output" from your program and is shown for clarity only here. Also note that what the user types in is indicated by the blue area above. I also did not show examples of data validation – which you can handle in your own way.
Hints/other requirements:
Use safer_gets to read in character array data.
You should use %di (instead of %i) as the format specifier for the date fields because if you
enter an integer item starting with the number 0 (zero), C will interpret that number as "octal", which will cause erroneous results. For this reason, I recommend that you use %d in the scanf statement when prompting the user for any int type data.
You do not need to use user-defined functions or string functions in this program (however, feel free to if you'd like to).
You are not permitted to use pointers in this program. (That will be in another assignment!)
You may use some string functions from the notes and chat sessions
You need to perform validation on all the fields entered except the name.
The date can have any label you wish, like birth date, hire date, etc.
For 3 points extra credit you can have the report the current date.
In: Computer Science