(The Rectangle class) Following the example of the Circle cl…
(The Rectangle class) Following the example of the Circle class in Section 9.2, design a class named Rectangle to represent a rectangle. The class contains: Two double data fields named width and height. A no-arg constructor that creates a rectangle with the default values 1 and 2 for the width and height, respectively. A constructor that creates a rectangle with the specified width and height. A method named getArea() that returns the area of this rectangle. A method named getPerimeter() that returns the perimeter. Implement the class. Write a main method that creates two Rectangle objects—one with width 4 and height 40 and the other with width 3.5 and height 35.9. Display the width, height, area, and perimeter of each rectangle in this order. For a hint on this program, please see https://liveexample.pearsoncmg.com/javarevel13e.html.
Read DetailsUse for the next two questions. Florida Commercial Bank (FCB…
Use for the next two questions. Florida Commercial Bank (FCB) has assets of $600 million, liabilities of $525 million, and equity of $75 million. The average duration of its asset portfolio is 10 years and that for the portfolio of liabilities is 6 years. Market interest rates are 8%. FCB wishes to hedge its balance sheet with Treasury bond options. The options contract are based on the same Treasury bonds used in the futures above and are currently quoted at 97-13 and have $100,000 face value. The benchmark long-term bond underlying the futures and options contract has a 7% coupon rate, a market yield of 7.25%, and a duration of 10.93 years. The call option delta is 0.47 and the put option delta is -0.43. How many options should FCB buy?
Read DetailsHandling files Write code to create an AssetManager which re…
Handling files Write code to create an AssetManager which reads the list of files from the folder into an array list. Ensure the number of elements in an ArrayList is printed using Log.d() method. Fill in this function. public static List getFilesFromAssets(Context context, String folderName) { // Your code goes here… // Log the number of files found Log.d(TAG, “Number of files in assets/” + folderName + “: ” + fileNames.size()); return fileNames; }
Read Details