Questions
Write a class Battery that models a rechargeable battery. A battery has a constructor public Battery(double...

Write a class Battery that models a rechargeable battery. A battery has a constructor

public Battery(double capacity)

where capacity is a value measured in milliampere hours. A typical AA battery has a capacity of 2000 to 3000 mAh. The method

public void drain(double amount)

drains the capacity of the battery by the given amount. The method

public void charge()

charges the battery to its original capacity.

The method

public double getRemainingCapacity()

gets the remaining capacity of the battery.

Supply a Battery class that tests all methods. Make sure to print the remaining capacity.

If we create an instance of Battery class with 2000 mAh, call drain (500) and then call getRemainingCapacity(), it should print 1500mAh; now if we call charge() and then call getRemainingCapacity() it should print 2000mAh

In: Computer Science

Annual high temperatures in a certain location have been tracked for several years. Let X represent...

Annual high temperatures in a certain location have been tracked for several years. Let X represent the number of years after 2000 and Y the high temperature. Based on the data shown below, calculate the linear regression equation using technology (each constant to 2 decimal places). x y 3 35.01 4 35.38 5 37.75 6 36.12 7 36.49 8 40.16 9 38.93 10 39.7 11 42.77 12 43.24 13 42.11 14 44.08 The equation is ˆ y = x + Interpret the y-intercept of the equation: In 2003, the temperature was about 0.84. It does not make sense to interpret the intercept in this scenario. In 2014, the temperature was about 44.08. In 2003, the temperature was about 32.17. In 2000, the temperature was about 32.17

In: Statistics and Probability

According to a​ publication, 12.3​% of 18 to 25 dash year dash olds were users of...

According to a​ publication, 12.3​% of 18 to 25 dash year dash olds were users of marijuana in 2000. A recent poll of 1293 randomly selected 18 to 25 dash year dash olds revealed that 176 currently use marijuana. At the 5​% significance​ level, do the data provide sufficient evidence to conclude that the percentage of 18 to 25 dash year dash olds who currently use marijuana has changed from the 2000 percentage of 12.3​%? Use the​ one-proportion z-test to perform the appropriate hypothesis​ test, after checking the conditions for the procedure. What are the hypotheses for the​ one-proportion z-test? Upper H 0​: pequals nothing​; Upper H Subscript a​: p ▼ greater than not equals less than nothing ​(Type integers or​ decimals.)

In: Math

Consider the following realized annual returns: Year End Market Realized Return Stock B Realized Return 2000...

Consider the following realized annual returns:

Year End

Market Realized Return

Stock B

Realized Return

2000

21.2%

88.3%

2001

30.3%

56.4%

2002

22.3%

114.6%

2003

25.3%

68.4%

2004

-11.0%

-62.8%

  1. 2005

    -11.3%

    52.7%

    2006

    -20.8%

    -22.0%

    2007

    33.1%

    6.9%

    2008

    13.0%

    9.2%

    2009

    7.3%

    -0.9%

  2. Consider the following realized annual returns:








  3. Q1 : Suppose that you want to use the 10 year historical average return on the Market to forecast the expected future return on the Market. Calculate the 95% confidence interval for your estimate of the expect return. Q2 : Using the data provided in the table, calculate the average annual return, the variance of the annual returns, and the standard deviation of the average returns for Stock B from 2000 to 2009.

In: Finance

    Table Name: CUSTOMERS_1 CUST_NUM CUST_LNAME          CUST_FNAME          CUST_BAL 2001    James William        

    Table Name: CUSTOMERS_1

CUST_NUM CUST_LNAME          CUST_FNAME          CUST_BAL

2001    James William           $2,999

2002    Crane Frasier             $983

    Table Name: CUSTOMERS_2

CUST_NUM

            CUST_LNAME          CUST_FNAME          CUST_BAL

1999    Anderson         Anne $510

2000    Bryant Juan     $21

2002    Crane Frasier             $983

2003    Dent    George            $1,790

    Table Name: CUST_INVOICES

INV_NUM     CUST_NUM INV_DATE    INV_AMOUNT

9000    2000    23-Mar-16       245

9001    2001    23-Mar-16       260

9002    2001    30-Mar-16       275

9003    1000    10-Apr-16       286

using this information, i need help formulating an sql query:

    Write a SQL code that will show CUST_NUM, CUST_LNAME, and CUST_FNAME for the one who has minimal INV_AMOUNT

In: Computer Science

Python class Select a free ebook and download the plain text file (utf8). Write a program...

Python class

Select a free ebook and download the plain text file (utf8).

Write a program that does the following:

  • Read in your ebook (any book, any language)
  • Break the book into words (look at .split() for strings)
  • Make a dictionary of all words and how often they occur: for instance if the word'the' happened 2000 time and the word'a' happened 1940 times word_dict= {'the' : 2000, 'a' :1940}
  • Print the dictionary of word frequencies to a file (freqs.txt) with the most frequent at the top and least frequent at the bottom
  • No need to submit the book, I will run it on my own files.

Turn in a .py or Google Colab URL

Dictionaries are not easily sortable since they are not ordered like a list. To sort for this assignment use the following template.


import operator

sorted_dict = sorted(my_dict.items(),key=operator.itemgetter(1))

In: Computer Science

Thunderbolt plc raised finance through the issue of shares on 1 April 2018. The company issued...

Thunderbolt plc raised finance through the issue of shares on 1 April 2018. The company issued convertible bonds at their nominal value of K20 million. Interest is payable annually in arrears at the rate of 5%. The conversion would be done on the following terms: Each K4000 bond is convertible at any time up to maturity into 800 ordinary shares. Alternatively, the bonds would be redeemed at par after 4 years in 2022. The market rate applicable to non-convertible bonds is 9%. (The present value of $1 payable at the end of the year, based on rates of 5% and 9% are given in the table of the Appendix at the end of the question paper.) Required:

a) Explain why recognition of convertible bonds should be split into the liability component and the equity component, and calculate the two amounts Thunderbolt recognised.
b) Prepare an amortisation schedule showing amounts outstanding at the end of each of the four years to 31 March 2022 (Work to the nearest $000)
c) State what amounts would be reported in the statement of profit or loss and other comprehensive income for the year to 31 March 2020 in respect of the bonds, and

In: Accounting

Identify a mutual fund that focuses on international equities. It could be a single country fund,...

Identify a mutual fund that focuses on international equities. It could be a single country fund, a regional fund, or a non-U.S. global fund. It needs to be at least five years old. You may want to go directly to an investment company website such as Fidelity, Vanguard, etc.

Provide a brief introduction to the fund (about a paragraph) indicating its investment objective, size, turnover, and fee structure. Report on its performance during the past five years. (You don't need to compute this return if the information is available.) Determine the actual return for the fund over the 12 months ending December 2019. (This requires you to obtain prices and cash distributions from a source such as Yahoo Finance.) If an investor invested $10,000 at the end of December 2018, how much would his or her investment be worth by the end of December 2019? What is the level of management fees charged by the fund? Is this reflected in your assessment of return? Finally, what is the appropriate benchmark this fund should be compared to? Would this investor have been better off if they had been able to invest in the benchmark?

In: Finance

Laura Leasing Company signs an agreement on January 1, 2017, to lease equipment to Metlock Company....

Laura Leasing Company signs an agreement on January 1, 2017, to lease equipment to Metlock Company. The following information relates to this agreement.

1.

The term of the non-cancelable lease is 3 years with no renewal option. The equipment has an estimated economic life of 5 years.

2.

The fair value of the asset at January 1, 2017, is $62,000.

3.

The asset will revert to the lessor at the end of the lease term, at which time the asset is expected to have a residual value of $4,000, none of which is guaranteed.

4.

The agreement requires equal annual rental payments of $20,250 to the lessor, beginning on January 1, 2017.

5.

The lessee’s incremental borrowing rate is 5%. The lessor’s implicit rate is 4% and is unknown to the lessee.

6.

Metlock uses the straight-line depreciation method for all equipment.

(a) Prepare an amortization schedule that would be suitable for the lessee for the lease term.

(b) Prepare all of the journal entries for the lessee for 2017 and 2018 to record the lease agreement, the lease payments, and all expenses related to this lease. Assume the lessee’s annual accounting period ends on December 31

In: Accounting

The following facts pertain to a non-cancelable lease agreement between Shamrock Leasing Company and Pharoah Company,...

The following facts pertain to a non-cancelable lease agreement between Shamrock Leasing Company and Pharoah Company, a lessee.

Commencement Date May 1, 2017
Annual Lease Payment due at the Beginning of Each Year, Beginning with May 1, 2107 $17,225.30
Bargain purchase option price at end of lease term $4,000
Lease term 5 years
Economic life of leased equipment 10 years
Lessor’s cost $55,000
Fair value of asset at May 1, 2017 $77,000
Lessor's Implicit Rate 8%
Lessee's Incremental Borrowing Rate 8%

The collectibility of the lease payments by Shamrock is probable.

Compute the amount of the lease receivable at commencement of the lease.

Prepare a lease amortization schedule for Shamrock for the 5-year lease term.

Prepare the journal entries to reflect the signing of the lease agreement and to record the receipts and income related to this lease for the years 2017 and 2018. The lessor’s accounting period ends on December 31. Reversing entries are not used by Shamrock.

Suppose the collectibility of the lease payments was not probable for Shamrock. Prepare all necessary journal entries for the company in 2017.

In: Accounting