Questions
a) Explain the relationship between "programming to interfaces" and "loose coupling," why we care about these...

a) Explain the relationship between "programming to interfaces" and "loose coupling," why we care about these two things, and why it is not possible to create completely decoupled code.

b) Given the fact that we care about these two concepts, why might this imply that the new operator is problematic for creating flexible code?

In: Computer Science

This is the question about Verilog. the H/W question is "Explain about 'always syntax' in verilog...

This is the question about Verilog.

the H/W question is "Explain about 'always syntax' in verilog with the simple verilog example."

  

In: Computer Science

how would you make a 50 ml of a 10% acetic acid solution from a 30%...

how would you make a 50 ml of a 10% acetic acid solution from a 30% acetic acid solution? (i.e., what volume of 30% stock solution and what volume of water would you use?)

In: Chemistry

During the holiday season, shoppers were asked to estimate how much money they spent on gifts...

During the holiday season, shoppers were asked to estimate how much money they spent on gifts for themselves. Raw data is given below. Are the reported amounts significantly less than the actual amounts as determined from the receipts?

1) Write Ho (null) and H1 (alternative); indicate which is being tested.

2) Perform the statistical test ad write answer to the original question as a statement related to the original query

2) Construct a 99% confidence interval estimate of the mean difference between reported amounts and actual amounts . Interpret the resulting confidence interval, does it contain 0?

Actual Reported
53 26
67 45
72 54
72 49
62 35
70 41
73 41
68 49
64 38
58 31
73 44
37 19
63 32
67 37
52 29
59 33
64 39
36 19
59 30
72 48
57 32
61 33
54 28
40 23
63 42
43 23
66 34
60 31
60 34
61 34
40 26
64 48
65 48
49 29
47 29
59 35
72 44
65 39
63 40
70 50
48 31
50 38
76 55
46 27
61 44
63 44
48 26
41 26
53 30
52 28
46 23
43 24
75 54
57 32

In: Math

Learning Objectives Writing classes that represent objects Define object's state (Instance variables) Define objects constructors Write...

Learning Objectives

  • Writing classes that represent objects
  • Define object's state (Instance variables)
  • Define objects constructors
  • Write getter (accessor) and setter (mutator) methods.

As in previous labs, please write the Java code for each of the following exercises in BlueJ. For each exercise, write a comment before the code stating the exercise number.

Make sure you are using the appropriate indentation and styling conventions

Exercise 1 (15 Points)

  • In BlueJ, create a new project called Lab5
  • In the project create a class called DogDemo with a static method called makeDogs
  • Create a second class in the same project called Dog that will represent a single dog (just a class header and an empty body for now).
  • In the makeDogs method, create a Dog object called myDog. Note that the Dog and DogDemo classes are now connected by a dotted arrow in the project window to show that DogDemo depends on (uses) the Dog class.

Exercise 2 (20 Points)

  • In the Dog class, create a variable at the class level (also called instance data or a field) that will represent the dog's name (a String).
  • Declare this variable as private. This puts the Dog class in charge of how the name gets updated. This variable is not DIRECTLY accessible from outside the Dog class.
  • In the declaration of the variable, initialize it to "Lassie".
  • Create a toString method that returns the dog's name.
  • In the makeDogs method of the DogDemo class, print the Dog object you created. Run the makeDogs method.

Exercise 3 (15 Points)

  • This would be OK if all dogs were named Lassie!! Each instance of Dog (each Dog object) will have its own name variable, which contain different values. So create a constructor in the Dog class that accepts a parameter which is used to set the name variable.
  • In the makeDogs method, create a new dog and pass in the name "Lassie" to its constructor.
  • Create a second Dog object with a different name, "Rover" for example.
  • Print the two dog objects.

Exercise 4 (15 Points)

  • Add another field to the Dog class representing the dog's breed (a String) and one representing the dog's age (an int). Both fields should be private.
  • Modify the Dog constructor to set these values as well, based on parameters.
  • Define a new Dog objects in makeDogs and give them a name, breed and age.
  • Modify the toString method to return a string in the following form:

Fido is a 3-year-old German Sheppard

  • Test the updated makeDogs method. Think through what is happening at each step.

Exercise 5 (10 Points)

  • Add standard "getter" methods for all three fields. Remember that getter methods just returns the value of a private instance variable (field). This will make the value of a private variable accessible ONLY through this method.
  • In the makeDogs method, get and print just the breed of one of your created objects.
  • Then get and print just the name of another one of the created objects.

Exercise 6 (10 Points)

  • In Dog, add a "setter" method for the age field. Don't change the age if the parameter is less than 1.
  • In the makeDogs method, try to set the age of yourDog to 0, then print the Dog object to make sure the age did not change.
  • Then set the age of yourDog to 4 and print it again.

Exercise 7 (15 Points)

  • You may have heard the expression "That's 21 in dog years" or something similar. The idea is to come up with a number to make it easy to compare a dog's age to that of a human in terms of overall life span. The calculation used is real age multiplied by 7. So a dog that's 3 years old is "21 in dog years".
  • Add a method in Dog called getDogYears that returns the dog's age in dog-years. Do NOT create another field for this. Just return the dog's current age multiplied by 7.
  • In the makeDogs method, print each dog's age in dog-years:

Rover is 28 in dog-years.

In: Computer Science

On January 1, 2016, Apple granted 80,000 stock options to key members of its executive team....

On January 1, 2016, Apple granted 80,000 stock options to key members of its executive team. Each option grants the executives the ability to purchase one share of Apples common stock ($10 par value) at a price of $40 per share. The options were exercisable within a 2-year period beginning on January 1, 2018, as long as the executives remain an employee at Apple until that date. It is assumed that the options were for services performed equally in 2016 and 2017. The Black-Scholes option pricing model determines total compensation expense to be $1,300,000. On January 1, 2018, the Apple executives exercised 48,000 of their stock options. On that date, Apples stock had a market price of $50 per share. The remaining 32,000 stock options lapsed on January 1, 2020 because of the decision not to exercise their options.

Required

  1. Prepare the necessary journal entries related to the stock option plan for the years 2016 through 2020.
  2. Over what period of time should compensation cost be allocated?

In: Accounting

1. What is the molarity of a 12.6% solution of sodium carbonate with a density of...

1. What is the molarity of a 12.6% solution of sodium carbonate with a density of 1.31 g/mL?

2. What is the mass percent of potassium iodide in a 2.89 M solution of KI with a density of 1.27 g/mL?

3. In an experiment similar to your 15.72 mL of a 0.1294 M Ba(OH)2 solution is titrated with 20.00 mL of a HNO3 solution. What is the molarityof the HNO3?

In: Chemistry

A student in a statistics class tossed a die 300 times and obtained the results shown...

A student in a statistics class tossed a die 300 times and obtained the results shown in the table. Is the die fair? In other words does it fit a uniform distribution? Let alpha =.05        

Outcome

1

2

3

4

5

6

Observed Frequency

53

41

60

47

38

61

A. What is the null hypothesis?

B. What is the alternative hypothesis?

C. What distribution are you using?

D. What test are you running?

E. What is your conclusion?

In: Math

You are a staff associate at a major public accounting firm and graduated from college two...

You are a staff associate at a major public accounting firm and graduated from college two years ago. You are working on an audit for a small, non-profit religious publishing firm. After performing tests on the royalty payables system, you discover that for the past five years, the royalty payable system has miscalculated the royalties it owes to authors for their publications. The firm owes almost $100,000 in past due royalties. All of the contracts with each author are negotiated differently. However, each author’s royalty percentage will increase at different milestones in books sold (i.e., 2% up to $10,000 and 3% thereafter). The software package did not calculate the increases, and none of the authors ever received their increase in royalty payments. At first you can’t believe that none of the authors ever realized they were owed their money. You double check your calculations and then present your findings to the senior auditor on the job.

Much to your surprise, his suggestion is to pass over this finding. He suggests that you sample new additional royalty contracts and document that you expanded your testing and found nothing wrong. The firm’s audit approach is well documented in this area and is firmly based on statistical sampling. Because you had found multiple errors in the small number of royalty contracts tested, the firm’s approach suggested testing 100% of the contracts. This would mean (1) going over the budgeted time/expense estimated to the client; (2) possibly providing a negative audit finding; and (3) confirming that the person who audited the section in the years past may not have performed procedures correctly.

Based on the prior year’s work papers, the senior auditor on the job performed the testing phase in all of these years just before his promotion. For some reason, you get the impression that the senior auditor is frustrated with you. The relationship seems strained. He is very intense, constantly checking the staff ’s progress in the hope of coming in even a half-hour under budget for a designated test/audit area. There’s a lot of pressure, and you don’t know what to do. This person is responsible for writing your review for your personnel file and bonus or promotion review. He is a very popular employee who is “on the fast track” to partnership. You don’t know whether to tell the truth and risk a poor performance review and jeopardize your future with this company, or to tell the truth, hopefully be exonerated, and be able to live with yourself by “doing the right thing” and facing consequences with a clean conscience.

1. What would you do as the staff associate in this situation? Why? What are the risks of telling the truth for you? What are the benefits? Explain.

2. What is the “right” thing to do in this situation? What is the “smart” thing to do for your job and career? What is the difference, if there is one, between the “right” and “smart” thing to do in this situation? Explain.

3. Explain what you would say to the senior auditor, your boss, in this situation if you decided to tell the truth as you know it

In: Psychology

You spoke with your instructor and she claimed that the average number of hours that you...

You spoke with your instructor and she claimed that the average number of hours that you should study has to be more than 5 hours per week which will help you achieve an above average grade on any subject. She also suggested as a practice that you can test her claim and let her know what your conclusion is. So you decided to contact your peers and gather information to conduct a hypothesis to test your instructors claim.

Questions:

  1. Contact at least 15 peers (they don’t have to be from the same class) and obtain how much time they study each week.
  1. If you are to conduct a hypothesis test using the data you gathered,
    1. Which test (t test or z test) do you think be appropriate and why?
      (Hint: think about whether you have the population or sample standard deviation available)
  1. Is this a test on population proportion or mean?

  1. Calculate the sample statistics (sample mean or sample proportion based on the information given) (1 mark)
  1. Use the data set you gathered to conduct a hypothesis test to determine your instructor’s claim. Use 0.05 level of significance. Please show your work, the 5 steps as described in the textbook.

  1. Construct a 95% confidence interval for the population mean number of hours. Show your work.

In: Math

The following is the receipts and payments account for the year ended 31 December 2018: Receipts:...

The following is the receipts and payments account for the year ended 31 December 2018:

Receipts: Payments:
Balance b/f 2040 Bar Purchases 88680
Entrance fees 840 Rent 8320
Subscriptions: 2017 500 Wages 3720
2018 6100 Printing expenses 2560
2019 700 General expenses 1940
Bar Sales 104540 New Equipment 9000
Sales of investments 15000 Balance c/f 15500
129720 129720
(1)Additional information: 01-Jan-18 31-Dec-18
Bar inventory 5440 6300
Owing for bar purchases 6120 7160
Rent due 360 720
Heating and lighting due 320 380
Subscription due 500 800
General expenses paid in advance 100 140

(2) On 31 December 2017 the club held investments which cost $10000. During the year ended 31 December 2018, these were sold for $15000.
(3) Equipment was valued at $6000 on 31 December 2017. On 30 June 2018, the club purchased additional equipment at a cost of $ 10400. Depreciation is to be provided for at the rate of 10% per annum.

(a) Prepare the trading section of the income statement for the year ended 31 December 2018.
(b) Prepare the income and expenditure account for the year ended 31 December 2018.

In: Accounting

Respond to the following in a minimum of 175 words: Discuss the advantages and disadvantages of...

Respond to the following in a minimum of 175 words:

Discuss the advantages and disadvantages of using the ADDIE 5 Step Training Process.

Summarize how you would implement the ADDIE model in a training department.

In: Operations Management

Compare/Contrast with specific examples of similarites, differences etc. of works from Sebastian Bach and Antonio Vivaldi....

Compare/Contrast with specific examples of similarites, differences etc. of works from Sebastian Bach and Antonio Vivaldi. in 2 to 3 paragraphs starting with a thesis statement

In: Psychology

Describe the role of genetic risk factors in the development of bipolar disorder and how does...

Describe the role of genetic risk factors in the development of bipolar disorder and how does this relate to methods of treatment?

(Meant for an abnormal psychology class, we use the textbook Understanding Abnormal Behavior 11e by David Sue if thats any help)

In: Psychology

You are booking tickets for a flight to Brazil, the Cessna airplane only has 10 tickets....

You are booking tickets for a flight to Brazil, the Cessna airplane only has 10 tickets. It is common knowledge that only 85% of people who buy plane tickets actually make it to the gate, so the airline sells 11 tickets for your flight. What is the probability that there will be at least 1 empty seat?

In: Operations Management