C# 1. Create an Employee class with two fields: idNum and hourlyWage. The Employee constructor requires...

C#

1. Create an Employee class with two fields: idNum and hourlyWage. The Employee constructor requires values for both fields. Upon construction, thrown an ArgumentException if the hourlyWage is less than 7.50 or more than 50.00. Write a program that establishes, one at a time, at least three Employees with hourlyWages that are above, below, and within the allowed range. Immediately after each instantiation attempt, handle any thrown Exceptions by displaying an error message. Save the file as EmployeeExceptionDemo.cs.

2. Write an application that creates an array of five Employees. Prompt the user for values for each field for each Employee. If the user enters improper or invalid data, handle any exceptions that are thrown by setting the Employee’s ID number to 999 and the Employee’s pay rate to the $7.50. At the end of the program, display all the entered, and possible corrected, records. Save the file as EmployeeExceptionDemo2.cs.

In: Computer Science

Write this in c++ Leap year and Second in year program Whether a year is a...

Write this in c++

Leap year and Second in year program

  1. Whether a year is a leap year on not a leap year.
  2. The number of seconds in a year. (FYI, it will be a different amount for leap vs non-leap year.) You can calculate the seconds by whatever means you choose, whether with defined constants and calculations or just calculations. It is your choice.
  3. If the user inputs a year number greater than zero, the program returns how many seconds were or will be in that year.
  4. Put in descriptions for your request for input. If you do the bonus portion, also put that in for your request.
  5. Tell the user that an input of -99 ends the program. (+5)
    Put your prompt in a loop, asking the user each time what year to check. (+5)
  6. You should assume a day length of exactly 24 hours. Obviously, multiplying 365*24*3600 isn’t exactly a programming challenge, and it won’t even give the right answer for all years.
  7. You must take account of leap years, which means your years will not all have the same number of days. If you do not already know, here is the calculation for leap years:

1. If a year is divisible by 4 with no remainder, it is a leap year,
2. unless it is a centurial year (ending in 00).
3. Then it is not a leap year,
4. unless it is a year divisible by 400, in which case it is still a leap year.

For example:

1904 is a leap year—evenly divisible by 4.
1900 is not a leap year—it is evenly divisible by 4, and also evenly divisible by 100. However, it is not evenly divisible by 400.
2000 is a leap year— it is evenly divisible by 4, evenly divisible by 100, but also evenly divisible by 400.
Your calculation should ignore all other variations in the length of the calendar year, such as leap seconds or the change from the Julian to the Gregorian system.

In: Computer Science

Draw the supply and demand graph for coffee below assuming the market operates at an equilibrium...

  1. Draw the supply and demand graph for coffee below assuming the market operates at an equilibrium price of $2.40 and an equilibrium quantity of 5,000.
  2. Assuming tea and coffee are substitutes, what will happen in the market for coffee if the price of tea increases? Show the effects on your market.
  3. Based on this information, will producer surplus in the market for coffee increase or decrease? Explain.

In: Economics

How fast, in rpm, would a 130 g , 58-cm-diameter beach ball have to spin to...

How fast, in rpm, would a 130 g , 58-cm-diameter beach ball have to spin to have an angular momentum of 0.15 kg⋅m2/s ? Express your answer using two significant figures.

In: Physics

C++ ! Create a Stash class specifically for storing Rect objects and call it RectStash. Add...

C++ !

Create a Stash class specifically for storing Rect objects and call it RectStash. Add a default constructor and a destructor to correctly initialize your RectStash class. Then write a program that will read several lines as input. Each line will contain 4 floats defining a 2D rectangle in the Rect format described above. Read the rectangles adding them to a RectStash object. Stop reading rectangles when your program loads 4 negative float values. After this point you will start reading a series of 2D points, and for each 2D point you will print the classification of each point in respect to all previously read rectangles. The classification should print "in" or "out" according to its result. Stop your program when you read vector (-99,-99).

Everything should be contained in one file. You may not assume the existance of any header files in your working directory.

Sample Input:

-5 -5 2.5 2.5
5 8 2 2
-1 -1 -1 -1
0 0
-4 -6
6 9
-99 -99

result:

out out
in out
out out

In: Computer Science

How did the expansion of the public sphere and a new language of rights offer oppurtunities...

How did the expansion of the public sphere and a new language of rights offer oppurtunities to women?

(Answer must be 200 words)

In: Economics

P company purchased a 70% interest in S company on January 1, 2015 for $2,000,000. The...

P company purchased a 70% interest in S company on January 1, 2015 for $2,000,000. The book value and fair value of the assets and liabilities of S company on that day were:

                                                BOOK VALUE                     FAIR VALUE

Current assets                   $700,000                              700,000

Equipment                         1,600,000                             2,000,000

Land                                      500,000                                 700,000

Deferred charge               400,000                                 400,000

Total Assets                       3,200,000                             3,800,000

Less: Liabilities                 (700,000)                             (700,000)

Net Assets:                         2,500,000                             3,100,000

The equipment had a remaining useful life of 8 years on January 1, 2015 and the deferred charge was being amortized over a period of 10 years from that date. C/S was $1,700,000 and Retained Earnings was $110,000 on that same date. P company uses partial-equity method to record its investment within S company.

Create the December 31, 2015 work paper entries that:

  1. Eliminate the investment account
  2. Allocate and amortize the difference between implied value and book value

In: Accounting

How to run the following code in ecclipse IDE? MQTT PUBLISH - SUBSCRIBE MODEL CODE IN...

How to run the following code in ecclipse IDE?

MQTT PUBLISH - SUBSCRIBE MODEL CODE IN JAVA

(slide 29)public class Publisher
{
public static final String BROKER_URL = "tcp://broker.mqttdashboard.com:1883";
private MqttClient client;

public Publisher()
{

String clientId = Utils.getMacAddress() + "-pub";
try
{
client = new MqttClient(BROKER_URL, clientId);
}
catch (MqttException e)
{
e.printStackTrace();
System.exit(1);
}
}
}
//connecting client (slide 30)

MqttConnectOptions options = new MqttConnectOptions();
options.setCleanSession(false);
options.setWill(client.getTopic("home/LWT"), //helps detecting failures of other clients
"I'm gone".getBytes(), 2, true);

client.connect(options);

//the busniness logic (slide 31)
public static final String TOPIC_TEMPERATURE = "home/temperature";

//...
while (true)
{
publishBrightness();
Thread.sleep(500);
publishTemperature();
Thread.sleep(500);
}
//...

private void publishTemperature() throws MqttException {
final MqttTopic temperatureTopic = client.getTopic(TOPIC_TEMPERATURE);

final int temperatureNumber = Utils.createRandomNumberBetween(20, 30);
final String temperature = temperatureNumber + "°C";

temperatureTopic.publish(new MqttMessage(temperature.getBytes()));
}

//publishBrightness() will be implemented the same way publishTemperature() is


//implementing the subscribing client

public class SubscribeCallback implements MqttCallback(slide 32)
{

@Override
public void connectionLost(Throwable cause) {}

@Override
public void messageArrived(MqttTopic topic, MqttMessage message)
{
System.out.println("Message arrived. Topic: " + topic.getName() + " Message: " + message.toString());

if ("home/LWT".equals(topic.getName()))
{
System.err.println("Sensor gone!");
}
}

@Override
public void deliveryComplete(MqttDeliveryToken token) {}

}

\\make it known to the MqttClient before connecting (slide 34)

mqttClient.setCallback(new SubscribeCallback());
mqttClient.connect();
mqttClient.subscribe("home/#");

In: Computer Science

1. A corporation has 71,376 shares of $24 par stock outstanding that has a current market...

1. A corporation has 71,376 shares of $24 par stock outstanding that has a current market value of $312 per share. If the corporation issues a 4-for-1 stock split, the market value of the stock will fall to approximately

a.$17,844

b.$288

c.$78

d.$6

2. On January 1 of the current year, the Barton Corporation issued 9% bonds with a face value of $98,000. The bonds are sold for $95,060. The bonds pay interest semiannually on June 30 and December 31 and the maturity date is December 31, five years from now. Barton records straight-line amortization of the bond discount. The bond interest expense for the year ended December 31 is

a.$2,940

b.$735

c.$9,408

d.$8,820

3. A company with working capital of $840,000 and a current ratio of 4 pays a $135,000 short-term liability. The amount of working capital immediately after payment is

a.$840,000

b.$705,000

c.$135,000

d.$975,000

4. A company with 100,000 authorized shares of $4 par common stock issued 40,000 shares at $8. Subsequently, the company declared a 4% stock dividend on a date when the market price was $12 a share. What is the amount transferred from the retained earnings account to paid-in capital accounts as a result of the stock dividend?

a.$19,200

b.$32,000

c.$12,800

d.$48,800

5. The balance sheets at the end of each of the first two years of operations indicate the following:

Kellman Company

Year 2

Year 1

Total current assets

$627,334

$563,517

Total investments

61,933

43,071

Total property, plant, and equipment

946,792

708,418

Total current liabilities

113,967

87,707

Total long-term liabilities

287,103

225,002

Preferred 9% stock, $100 par

82,116

82,116

Common stock, $10 par

571,867

571,867

Paid-in capital in excess of par-common stock

60,515

60,515

Retained earnings

520,491

287,799

Using the balance sheets for Kellman Company, if net income is $119,551 and interest expense is $31,114 for Year 2, and the market price of common shares is $34, what is the price-earnings ratio on common stock for Year 2 (rounded to two decimal places)?

a.1.96

b.10.69

c.10.21

d.17.35

In: Accounting

Agatha Agate Inc. began business on January 1, 2013. At December 31, 2013, it had a...

Agatha Agate Inc. began business on January 1, 2013. At December 31, 2013, it had a $6,000
balance in the deferred tax liability account related to property, plant and equipment. The
equipment, purchased in 2013, cost $1,200,000. Agatha is depreciating the equipment on a
straight-line basis over six years for financial reporting purposes. The equipment is a Class 8 -20%
asset for tax purposes. In 2013 Agatha reported depreciation expense of $100,000 and calculated
CCA as $120,000. [Note: Agatha took 50% in the year of acquisition. Both depreciation and CCA will
be calculated at the full rates in 2014]. Agatha’s before tax income in 2014 was $80,000. Agatha
follows IFRS. Information about income includes the following:
a. Total rent paid in 2014 was $75,000 of which $25,000 was expensed in 2014. The remaining $50,000
represents prepaid rent, which will be expensed equally in 2015 and 2016. The full $75,000 was
deducted for tax purposes in 2014.
b. Agatha Agate Inc. pays $12,000 per year for a membership in a local golf club for the company’s
president.
c. The company now offers a one-year warranty on all merchandise sold. Warranty expenses for 2014 were
$12,000. Cash payments for warranty expense were $6,000 in 2014.

d. Meals and entertainment expenses (only 50% of which are ever deductible for tax purposes) were
$16,000 in 2014.
e. The current tax rate is 30% and the rate has not changed since Agatha began business.
Required: [16 marks]
i. Calculate the balance in the Deferred Tax Asset or Liability account at December 31, 2014 [4 marks]
ii. Calculate income tax payable for 2014 [5 marks]
iii. Prepare the journal entries to record income taxes for 2014 [2 marks]
iv. Prepare the income tax expense section of the income statement for 2014, beginning with Income before
income tax [3 marks]
v. Prepare the liability section of the Statement of Financial Position at December 31, 2014 for deferred
income taxes. [2 marks]

In: Accounting

what determines when it is a good time for a company to raise or lower the...

what determines when it is a good time for a company to raise or lower the price of their product using pricing of elasticity demand

In: Economics

An inorganic soil has a liquid limit of 35 and a plastic limit of 31. The...

An inorganic soil has a liquid limit of 35 and a plastic limit of 31. The following are also known:
Percent passing No. 4 sieve: 80
Percent passing No. 200 sieve: 10
D10 = 0.075 mm ; D30 = 0.37 mm ; D60 = 1.6 mm
Classify the soil using USCS. Give both the group symbol and group name.

In: Civil Engineering

Write a C program which adds up all the numbers between 1 and 50. Use any...

Write a C program which adds up all the numbers between 1 and 50. Use any type of loop

In: Computer Science

Write a JavaScript program to implement the Least-Squares Linear Regression algorithm shown below, for an arbitrary...

Write a JavaScript program to implement the Least-Squares Linear Regression algorithm shown below, for an arbitrary set of ( x, y ) data points entered by the user.

Least-Squares Linear Regression: • Linear regression basically means finding the ( equation for the ) straight line that is the closest “fit” to a set of ( x, y ) data points.

• Least-squares is a means of identifying the “best” fit between the line and the data. For each data point, the distance between the point and the line is calculated and squared, and the total of these squared distances is added up over all the data points. The straight line that yields the minimum value for this sum of squares is defined as the best fit.

• calculate the correlation coefficient, r, which is a metric for how well the line fits the data, and if the correlation is positive or negative. This value always lies between -1.0 and 1.0 inclusive. The closer it is to 1.0, the stronger the positive correlation; The closer to -1.0 the stronger the negative correlation; and if the coefficient is close to zero, then it shows a weak correlation ( if any ) between x and y.

The Algorithm: 1. Read in a series of ( x, y ) data pairs. While doing so, calculate the following sums:

• N = number of data pairs.

• Sx = ∑ x = Summation ( total ) of all X values.

• Sy = ∑ y = Summation ( total ) of all Y values.

• Sxx = ∑ x2 = Summation ( total ) of all X2 values.

• Syy = ∑ y2 = Summation ( total ) of all Y2 values.

• Sxy = ∑ xy = Summation ( total ) of all X∙Y values.

2. Then calculate: • Slope, m = ( N ∙ Sxy – Sx ∙ Sy ) / ( N ∙ Sxx – Sx ∙ Sx ) • Intercept, b = ( Sy – m ∙ Sx ) / N

3. Report the best-fit line as y = m x + b

4. Finally calculate and report the correlation coefficient, r, as:

• ? = ? ∙ ???−?? ∙ ?? /√( ? ∙ ???−?? ∙ ?? ) ∙ ( ? ∙ ???−?? ∙ ?? )

In: Computer Science

Discuss different steps and approaches involved in estimating time? Please explain in brief the different steps...

Discuss different steps and approaches involved in estimating time? Please explain in brief the different steps involved in the Critical Path Model as part of Project Scheduling.

Please give answer in more than 400 words and prefer to paste from word or excel or type as plain text.

In: Accounting