Question 3: Write the following Java program.
A. Create a class called Quadrilateral that contains the following: [4 Marks]
• Five double type data fields for: side1, side2, side3, side4, and perimeter
• A no-argument constructor that creates a Quadrilateral with all sides equal to 1
• Methods named setSide1(double s1), setSide2(double s2), setSide3(double s3), and
setSide4(double s4) to set the values of the four sides
• A method named calculatePerimeter( ) to calculate and return the perimeter of the
quadrilateral
B. Create a child class called Square that contains a method named calculateArea() to
calculate the area of the Square. [2 Marks]
C. Create a java main class named TestQuad to do the following: [4 Marks]
• Create a Quadrilateral object named Quad1 and a Square object named Sq1.
• Call the methods setSide1(double s1), setSide2(double s2), setSide3(double s3), and
setSide4(double s4) to:
o set the sides of Quad1 to 10, 20, 25, and 30, respectively
o set all sides of Sq1 to 3
• Display the perimeter of Quad1 by calling the method calculatePerimeter ( ). Display
the perimeter of Sq1 by calling the method calculatePerimeter ( ).
• Display the area of Sq1 by calling the method calculateArea()
Hint: Perimeter = sum of all sides & Area of Square = side * side
In: Computer Science
write an essay about Special Order Decisions in your own words.
In: Accounting
A family is considering installing a household solar energy system. The system has an installed cost of $1700 and they reduce the homeowner’s energy bill by $400 per year. The residual value of the solar panels is $150 at the end of their 5-year life. What is the annual effective IRR of this investment? Assume the family has a MARR of 10%. Please use the interpolation method and only fill in the number of your calculated result in the blank, e.g., if the result is 7.537%, fill in “7.54”; also keep 2 digits after the decimal point.
In: Economics
The following is extracted information from financial statements of Kabuku Ltd for the years 2005 to 2009
Balance Sheet as at year end 31st Dec
|
2005 |
2006 |
2007 |
2008 |
2009 |
|
|
CAPITAL AND |
|||||
|
LIABILITIES: |
|||||
|
Equity share capital |
400,000 |
600,000 |
500,000 |
400,000 |
600,000 |
|
Long term loan |
500,000 |
250,000 |
300,000 |
400,000 |
300,000 |
|
Sundry creditors |
200,000 |
300,000 |
350,000 |
340,000 |
250,000 |
|
Short term loan |
50,000 |
40,000 |
60,000 |
115,000 |
50,000 |
|
ASSETS: |
|||||
|
Land and Building |
300,000 |
500,000 |
600,000 |
700,000 |
450,000 |
|
Furniture |
600,000 |
450,000 |
400,000 |
400,000 |
500,000 |
|
Cash at bank |
50,000 |
60,000 |
70,000 |
50,000 |
70,000 |
|
Stock |
140,000 |
150,000 |
100,000 |
80,000 |
120,000 |
|
Prepaid expenses |
60,000 |
30,000 |
40,000 |
25,000 |
60,000 |
You are required to carry out the following analyses;
Common size balance sheet for the five years. and interpret.
In: Finance
Acid/Base Equilibrium - Weak Acids/Bases
1. Estimate the initial [HClO] in an aqueous solution in which the [OCl-] is 0.0000114 M at equilibrium (make an exact calculationassuming that initial concentration is not equal to the equilibrium concentration).
(Constant = Ka=3.50×10-8)
HClO = OCl- + H+
|
_________________ M 2. Calculate the [C6H5CO2-] of a 6.74×10-3 M solution of the weak acid C6H5CO2H (make an exact calculation assuming that initial concentration is not equal to the equilibrium concentration). (Constant = Ka=6.30×10-5) C6H5CO2H = C6H5CO2- + H+ |
_________________ M
3. Calculate the molar concentration of H+ ion of a 1.31×10-2 M solution of the weak acid HClO (make an exact calculationassuming that initial concentration is not equal to the equilibrium concentration). Round your answer to 3 significant digits.
(Constant = Ka=3.50×10-8)
HClO = OCl- + H+
In: Chemistry
he following costs result from the production and sale of 4,900 drum sets manufactured by Tight Drums Company for the year ended December 31, 2017. The drum sets sell for $340 each. The company has a 35% income tax rate.
| Variable production costs | |||
| Plastic for casing | $ | 171,500 | |
| Wages of assembly workers | 490,000 | ||
| Drum stands | 215,600 | ||
| Variable selling costs | |||
| Sales commissions | 161,700 | ||
| Fixed manufacturing costs | |||
| Taxes on factory | 6,000 | ||
| Factory maintenance | 12,000 | ||
| Factory machinery depreciation | 72,000 | ||
| Fixed selling and administrative costs | |||
| Lease of equipment for sales staff | 12,000 | ||
| Accounting staff salaries | 62,000 | ||
| Administrative management salaries | 142,000 | ||
Required:
1. Prepare a contribution margin income
statement for the company.
2. Compute its contribution margin per unit and
its contribution margin ratio.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
How many grams of dry NH4Cl need to be added to 2.20 L of a 0.600 M solution of ammonia, NH3, to prepare a buffer solution that has a pH of 8.50? Kb for ammonia is 1.8×10−5.
In: Chemistry
Question 2 (1 point)
Saved
Your aunt tells you that she will give you $100 today. However, if you are willing to wait, she will give you $105 in one year. You are convinced your aunt will follow through, so there is no risk in waiting. In this case,
Question 2 options:
|
you will wait for the $105 in one year, because it's more than $100. |
|
|
you will wait for the $105 in one year, if the current market interest rate is less than 5%. |
|
|
you will wait for the $105 in one year, if the current market interest rate is more than 5%. |
Question 8 (1 point)
Your friend needs a loan now and is willing to pay you back $150 in 1 year and another $150 in 2 years. (i.e. you will receive both payments) How much are you willing to lend your friend now if you want an interest rate of 6%?
Question 8 options:
|
$141.51 |
|
|
$267 |
|
|
$275.01 |
|
|
$300 |
In: Economics
Calculate ? H for the reaction: C4H4(g) + 2 H2(g) — > C4H8(g) ? H = ?
Given,
C4H4(g) + 5 O2(g) — > 4 CO2(g) + 2 H2O(l) DH = -2341 kJ
C4H8(g) + 6 O2(g) — > 4 CO2(g) + 4 H2O(l) DH = -2755 kJ
H2(g) + ½ O2(g) — > H2O(l) DH = -286 kJ
In: Chemistry
JAVA - Write a program that prompts the user (at the command line) for 4 positive integers, then draws a pie chart in a window. Convert the numbers to percentages of the numbers’ total sum; color each segment differently; use Arc2D. No text fields (other than the window title) are required. Provide a driver in a separate source file to test your class.
Please use the following:
java.lang.Object
java.awt.Graphics
java.awt.Graphics2D
Take note of the following:
setPaint
setStroke
fill
// imports
public class PieChartPanel extends JPanel {
// attributes
// constructor
public void paintComponent(Graphics g) {
super.paintComponent (g);
Graphics2D g2d = ( Graphics2D ) g;
...
}
There should be a paintComponent method that calls its parent
In: Computer Science
Computer Science Multiple Choice: Please complete all 5 questions in exchange for an immediate upvote. Incomplete answers will be downvoted so please move on if they aren't worth your time. Thank you!
In: Computer Science
Note: The built-in character analysis functions
(isdigit(), islower(),
etc.) may not be used.
Exercise 6.1 Write to an output file
Open an output file (stream) and write your identifying information
to the
associated output file using a function. Put your standard output
informa-
tion in a function named ShowHeader(). The file stream must be
passed by
reference to the function. To do this, an & (ampersand) is used
between the
data type (ofstream) and the name of the argument (I like to use
fOut for
output file stream objects and fIn for input file stream object
names).
Exercise 6.2 Read from an input file
Read/Process an input file a character at a time. Open an input
file (stream)
and read a single character on each pass through a loop (a while()
loop is
probably easiest) until the end of file is reached. After reading
the character,
write it to the output file created earlier. The output should
contain the
same characters as the input file.
Exercise 6.3 Character Analysis
Suggestion: Develop the remainder of this program in piecewise
manner–
specifically, add one character analysis operation at a time,
before adding
the next.
Analyze the characters in a file using functions to display their
charac-
teristics, e.g., lower case, digit etc. The logic for analysis will
be inside the
loop above.
Specifically, test if the character:
• is a letter.
• test if it is lower case or upper case.
• if the character is a letter, test if it is a vowel or
consonant.
• is a digit.
• if the character is a digit, test if the value is odd or
even.
• is a punctuation character.
• is a logical operator symbol.
Write a short function for most operations in the list above. If a
character
is a letter, then it is either upper or lower case, so we only need
to write one
function to test the case of the character. Do not use the built-in
functions.
Note: there are no I/O (input/output) operations in
the functions, only a
single character is examined.
In: Computer Science
Astronauts often see flashes when they are in space. How often these particles make their ways down to the Earth and hit us? What's the chance they hit our eyes and see flashes?
In: Physics
A hydrogen atom, initially at rest, absorbs an ultraviolet photon with a wavelength of λ=177.9nm.
Part A:
What is the atom's final speed if it now emits an identical photon in a direction that is perpendicular to the direction of motion of the original photon?
Express your answer to three significant figures and include appropriate units.
Part B:
What is the atom's final speed if it now emits an identical photon in a direction that is opposite to the direction of motion of the original photon?
Express your answer to three significant figures and include appropriate units.
In: Physics
==
Match the vocabulary word to its definition.
Question 4 options:
|
|
Put the following in the order they occur in making urine
Question 3 options:
|
1 |
counter current process |
|
2 |
reabsorption of water in the collecting duct due to ADH |
|
3 |
glomerular filtration |
|
4 |
blood flow to the glomerulus |
In: Biology