Description (same for next three questions) Your job is to write an instantiable class that represents a parcel of raw land that can be sold by a real estate company. This class should be named Land. It will contain two fields: width and length, measured In feet, each of which can accept numbers with decimal points. You may assume that every parcel of land is rectangular and that 'width' describes the size of the property along the road and Tength' is how far back it goes from the road. The class needs one constructor that sets the values of the two fields. The class needs the following public methods: Getters and setters for all fields. A method called getArea that calculates and returns the area of the parcel of land in square feet. Standard methods: toString, equals, and hashCode where equals and hashCode define an equivalent parcel of land as one with exact same the same dimensions

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 34SA
icon
Related questions
Question

Need help with this please 

Q.1
Description (same for next three questions)
Your job is to write an instantiable class that represents a parcel of raw land that can be sold by a real
estate company. This class should be named Land. It will contain two fields: width and length, measured
In feet, each of which can accept numbers with decimal points. You may assume that every parcel of
land is rectangular and that width' describes the size of the property along the road and length' is how
far back it goes from the road.
The class needs one constructor that sets the values of the two fields.
The class needs the following public methods:
Getters and setters for all fields.
A method called getArea that calculates and returns the area of the parcel of land in square
feet.
Standard methods: tostring, equals, and hashCode where equals and hashCode define an
equivalent parcel of land as one with exact same the same dimensions.
• Implementation of the Comparable interface.
For this question, write a complete UML class diagram for this class. Use a line of minus signs to
separate sections. Don't worry about drawing a box or centering any text. Do include all proper UML
notation.
Q.2
Using the same information as in the previous question, create a NetBeans project named Exam2 and
create the Land class with all the fields, constructors, and methods listed. Copy and paste the code for
that class here. To retain your formatting, change the Canvas editor from Paragraph to Preformatted,
switch to HTML mode, and then paste your code between the <pre> and </pre> tags.
Q.3
Write a JUnit class that tests the instantiable class. It is your job to determine what makes sense to test
and what values to use in order to thoroughly test the class's methods. Copy and paste the entire code
here. To retain your formatting, change the Canvas editor from Paragraph to Preformatted, switch to
HTML mode, and then paste your code between the <pre> and </pre> tags.
Transcribed Image Text:Q.1 Description (same for next three questions) Your job is to write an instantiable class that represents a parcel of raw land that can be sold by a real estate company. This class should be named Land. It will contain two fields: width and length, measured In feet, each of which can accept numbers with decimal points. You may assume that every parcel of land is rectangular and that width' describes the size of the property along the road and length' is how far back it goes from the road. The class needs one constructor that sets the values of the two fields. The class needs the following public methods: Getters and setters for all fields. A method called getArea that calculates and returns the area of the parcel of land in square feet. Standard methods: tostring, equals, and hashCode where equals and hashCode define an equivalent parcel of land as one with exact same the same dimensions. • Implementation of the Comparable interface. For this question, write a complete UML class diagram for this class. Use a line of minus signs to separate sections. Don't worry about drawing a box or centering any text. Do include all proper UML notation. Q.2 Using the same information as in the previous question, create a NetBeans project named Exam2 and create the Land class with all the fields, constructors, and methods listed. Copy and paste the code for that class here. To retain your formatting, change the Canvas editor from Paragraph to Preformatted, switch to HTML mode, and then paste your code between the <pre> and </pre> tags. Q.3 Write a JUnit class that tests the instantiable class. It is your job to determine what makes sense to test and what values to use in order to thoroughly test the class's methods. Copy and paste the entire code here. To retain your formatting, change the Canvas editor from Paragraph to Preformatted, switch to HTML mode, and then paste your code between the <pre> and </pre> tags.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning