Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type, and
Question:
Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type, and an area. Include an abstract method to determine the area of the figure. Create two subclasses called Square and Triangle. Create an application that demonstrates creating objects of both subclasses, and store them in an array. Save the files as GeometricFigure.java, Square.java, Triangle.java, and UseGeometric.java.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 55% (9 reviews)
public abstract class GeometricFigure protected int height protected int width protected String figu...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Which of the following statements is true? a. Superclass objects are members of their subclass. b. Superclasses can contain abstract methods. c. You can create an abstract class object using the new...
-
a. Create an abstract class named Book. Include a String field for the books title and a double field for the books price. Within the class, include a constructor that requires the book title, and...
-
a. The Talk-A-Lot Cell Phone Company provides phone services for its customers. Create an abstract class named PhoneCall that includes a String field for a phone number and a double field for the...
-
The cable of the 1800 kg elevator cab in Figure snaps when the cab is at rest at the first floor, where the cab bottom is a distance d = 3.7 m above a spring of spring constant k = 0.15 MN/m. A...
-
During 2016, Belk Corporation purchases $70,000-worth of equipment for use in its business. Belk's current taxable income before considering the Section 179 deduction is $26,000. a. What is Belk's...
-
Prem International has two large subsidiaries: Oil and Chemical. Oil is an oil-refining business, and its main product is gasoline. Chemical produces and sells a variety of chemical products....
-
Using the fourth-order Runge-Kutta method, solve Problem 11.15. Data From Problem 11.15:- Using the second-order Runge-Kutta method, solve the differential equation \(\ddot{x}+1000 x=0\) with the...
-
Retley Manufacturing makes three products: Gizmos, Whizmos, and Gadgets. The products sell for $50, $90, and $100, respectively. Each product requires processing on each of two machines. The grinding...
-
a. Create and store a three dimensional array with six layers of a 42 matrix, filled with a decreasing sequence of values between 4.8 and 0.1 of the appropriate length. b. Extract and store as a new...
-
Raytheon Company disclosed the following data related to segment sales and operating profits for fiscal 2018. $ millions Total Net Sales Operating Income 2018 2017 2016 2018 2017 2016 Integrated...
-
Write an application named UseInsurance that uses an abstract Insurance class and Health and Life subclasses to display different types of insurance policies and the cost per month. The Insurance...
-
Modify Exercise 10, adding an interface called SidedObject that contains a method called displaySides(); this method displays the number of sides the object possesses. Modify the GeometricFigure...
-
A bankruptcy trustee is automatically appointed in all bankruptcy cases. a. True b. False
-
Janice will need to pay $200 at the end of every month for the next 12 months, except for the payment of the 8th month. What is the present value, assuming a rate of 4%, compounded quarterly?
-
Slapshot Company makes ice hockey sticks and sold 16,000 sticks during the month of June at a total cost of $431,000. Each stick sold at a price of $90. Slapshot also incurred two types of selling...
-
Fuzzy Monkey Technologies, Incorporated purchased as a long-term investment $210 million of 6% bonds, dated January 1, on January 1, 2024. Management has the positive intent and ability to hold the...
-
Cast Iron Grills, Incorporated, manufactures premium gas barbecue grills. The company reports inventory and cost of goods sold based on calculations from a LIFO periodic inventory system. Cast Iron's...
-
Clopack Company manufactures one product that goes through one processing department called Mixing. All raw materials are introduced at the start of work in the Mixing Department. The company uses...
-
A 20-cm-diameter circular cover is placed over a 10-cm diameter hole that leads into an evacuated chamber. The pressure in the chamber is 20 kPa. How much force is required to pull the cover off?
-
Wholesalers Ltd. deals in the sale of foodstuffs to retailers. Owing to economic depression, the firm intends to relax its credit policy to boost productivity and sales. The firms current credit...
-
The case in a recursive method that does not make a recursive call is the _________________. a. Primary case b. Base case c. Extraordinary case d. Negative case
-
In a recursive method, there typically are _________________. a. More base cases than if statements b. More recursive cases than base cases c. More base cases than while loops d. More base cases than...
-
Write a program that prompts the user for an integer. Pass the integer to a method that determines whether the number is greater than 0; if it is, the method displays the number and passes one less...
-
The following data was extracted from the records of DT Ltd on 28 February 2021, the end of their financial year: R Share capital (900 000 shares at R2 par value) 1 800 000 Retained income 160 000...
-
THE FIRST ONE WITHOUT AN IDE AND THE SECOND ONE WITH AN IDE Task Description complete a Java application to draw different shapes with the specified color and size, subject to the following...
-
Suppose two factors are identified for the U.S. economy: the growth rate of industrial production, IP, and the inflation rate, IR. IP is expected to be 3% and IR 6%. A stock with a beta of 1 on IP...
Study smarter with the SolutionInn App