Master College Concepts with Expert Q&A and Solutions
In a plant, leaf color and leaf shape are controlled by two linked genes Leaves of the wild-type plant are red. A recessive mutation in this gene causes white leaves. Wild-type leaves are pointed, and a recessive mutation in this gene causes them to be smooth. The following crosses were performed Cross 1: pure breeding white, smooth X pure breeding red, pointed gives: all red, pointed Cross 2: red, pointed F1 X pure breeding white, smooth (test cross gives: 40 white, smooth 36 red, pointed 10 white, pointed 14 red, smooth hape? What is the recombination frequency between the gene for color and for shape?
Complete the code for this PiggyBank class. I have also included a main program (TestPiggy) for you to use to test your class. When I grade your PiggyBank class, I will use this exact same main program so be sure your class compiles and runs with it. I have also attached a screenshot of what your output should look like. Note the way the numeric values are formatted; yours should be the same.public class PiggyBank implements Measurable, Comparable {private int numNickels, numPennies, numDimes, numQuarters;// to do; complete the constructorpublic PiggyBank() {}// to do; complete the constructorpublic PiggyBank(int quarters, int dimes, int nickels, int pennies){}// to do; it just returns 0; code it so that it returns the monetary// amount of the piggy bankpublic double getMeasure(){return 0.0;}// to do; it just returns 0; code it so that it correctly comparespublic int compareTo(Object other){return 0;}// to do; it just returns a blank string right nowpublic String toString(){return "";}}public class Data{public static double average(Measurable[] objects){double sum = 0;for (Measurable obj : objects){sum = sum + obj.getMeasure();}if (objects.length > 0){return sum / objects.length;}else {return 0;}}}import java.text.NumberFormat;import java.util.Arrays;public class TestPiggy { public static void main(String[] args) { PiggyBank [] banks = new PiggyBank[10]; banks[0] = new PiggyBank(5, 10, 19, 32); banks[1] = new PiggyBank(6, 0, 2, 1); banks[2] = new PiggyBank(0, 20, 15, 3); banks[3] = new PiggyBank(1, 3, 99, 591); banks[4] = new PiggyBank(0, 0, 10, 0); banks[5] = new PiggyBank(15, 3, 0, 25); banks[6] = new PiggyBank(); banks[7] = new PiggyBank(11, 3, 0, 1); banks[8] = new PiggyBank(0, 0, 1, 5); banks[9] = new PiggyBank(8, 10, 20, 100); NumberFormat formatter = NumberFormat.getCurrencyInstance(); String moneyString = formatter.format(Data.average(banks)); System.out.println ("The average of all the piggy banks is " + moneyString); Arrays.sort(banks); System.out.println ("The piggy banks in sorted order, smallest to largest, are:"); for (int i = 0; i < 10; i++) System.out.println (banks[i]); }}
The following information was drawn from the Year 1 accounting records of Ozark Merchandisers:Inventory that had cost $21,200 was sold for $39,900 under terms 2/20, net/30.Customers returned merchandise to Ozark five days after the purchase. The merchandise had been sold for a price of $1,520. The merchandise had cost Ozark $920.All customers paid their accounts within the discount period.Selling and administrative expenses amounted to $4,200.Interest expense paid amounted to $360.Land that had cost $8,000 was sold for $9,250 cash.Requireda. Determine the amount of net sales. (Round your intermediate calculations and final answer to the nearest whole dollar amount.)b. Prepare a multistep income statement. (Round your intermediate calculations and final answer to the nearest whole dollar amount. Amounts to be deducted and losses should be indicated with a minus sign.)c. Where would the interest expense be shown on the statement of cash flows?i. Operating activitiesii. Investing activitiesiii. Financing activitiesd. How would the sale of the land be shown on the statement of cash flows?i. The full sales price of the land, $9,250, would be shown as a cash inflow from financing activities on the statement of cash flows.ii. The full sales price of the land, $9,250, would be shown as a cash inflow from investing activities on the statement of cash flows.iii. The full sales price of the land, $9,250, would be shown as a cash inflow from operating activities on the statement of cash flows