Create a class which represents a Real Estate Transaction. The class will have the following state:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
● ● Create a class which represents a Real Estate Transaction. The class will have the following state: O O O O Purchase Price in text notation (type:String) The class will have the following constructor(s): O Default constructor O A constructor that takes 4 arguments. The class will have the following behaviour: Appropriate setters/getters A method which will return the four fields of the object as one string in which the front "half of the string is lowercase. letters and the back "half of the string is uppercase letters. O Street Number in text notation (type:String) Street Name City Amethod which returns.a.substring to the caller of the full state of the obiect.concatenated into one string in which one. portion (length to be determined by a random number) of the string is lowercase letters and a second portion ((length to be determined by a second different random numberllof the string is uppercase letters based upon two valid random numbers. The two substrings can be any size or portion but they cannot overlap and both portions together do not have to comprise the full string. The method must do internal checking to ensure that the two random numbers are valid.ię, They cannot overlap and cannot go beyond the length of the String. O A method which takes two ints. The purpose of the method is to return an encrypted version of the state of the object as a single encrypted string to the caller. The method will concatenate the state of the object into one String. The first int will represent the index of the "key character" of the String. The second int will represent the index value of the first character to be encrypted; the key character will replace the first character of the string to be encrypted, and every third character thereafter. (For example: assume the concatenated String is ABCDEFGHIJ and the ints passed in are 2,3, this means that character 2 (C) replaces D, G and J.) The method must ensure that the first int is less than the second int passed in and that the neither int is greater than the length of the single concatenated String. If any of the info passed into the method is invalid return to the caller a "1" to represent an error. Create a test harness class which will instantiate a RealEstate Transaction object with 4 pieces of data you make up. Test method 1 Test method 2. Ask the user for two ints to test method three. If the ints are invalid ask the user for two more etc. until the user provide valid ints. ● ● Create a class which represents a Real Estate Transaction. The class will have the following state: O O O O Purchase Price in text notation (type:String) The class will have the following constructor(s): O Default constructor O A constructor that takes 4 arguments. The class will have the following behaviour: Appropriate setters/getters A method which will return the four fields of the object as one string in which the front "half of the string is lowercase. letters and the back "half of the string is uppercase letters. O Street Number in text notation (type:String) Street Name City Amethod which returns.a.substring to the caller of the full state of the obiect.concatenated into one string in which one. portion (length to be determined by a random number) of the string is lowercase letters and a second portion ((length to be determined by a second different random numberllof the string is uppercase letters based upon two valid random numbers. The two substrings can be any size or portion but they cannot overlap and both portions together do not have to comprise the full string. The method must do internal checking to ensure that the two random numbers are valid.ię, They cannot overlap and cannot go beyond the length of the String. O A method which takes two ints. The purpose of the method is to return an encrypted version of the state of the object as a single encrypted string to the caller. The method will concatenate the state of the object into one String. The first int will represent the index of the "key character" of the String. The second int will represent the index value of the first character to be encrypted; the key character will replace the first character of the string to be encrypted, and every third character thereafter. (For example: assume the concatenated String is ABCDEFGHIJ and the ints passed in are 2,3, this means that character 2 (C) replaces D, G and J.) The method must ensure that the first int is less than the second int passed in and that the neither int is greater than the length of the single concatenated String. If any of the info passed into the method is invalid return to the caller a "1" to represent an error. Create a test harness class which will instantiate a RealEstate Transaction object with 4 pieces of data you make up. Test method 1 Test method 2. Ask the user for two ints to test method three. If the ints are invalid ask the user for two more etc. until the user provide valid ints.
Expert Answer:
Answer rating: 100% (QA)
import javautilRandom class RealEstateTransaction private String streetNumber private String streetName private String city private String purchasePrice Default constructor public RealEstateTransactio... View the full answer
Related Book For
Business Statistics In Practice
ISBN: 9780073401836
6th Edition
Authors: Bruce Bowerman, Richard O'Connell
Posted Date:
Students also viewed these programming questions
-
answer the question clearly You are building a flight-control system for which a convincing safety case must be made. Would you assign the tasks of safety requirements engineering, test case...
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
What amounts should be recorded as a cost of a long-term asset?
-
Paul and Donna Decker are married taxpayers, ages 44 and 42, respectively, who file a joint return for 2016. The Deckers live at 1121 College Avenue, Carmel, IN 46032. Paul is an assistant manager at...
-
Show that when a square mesh is used in FDM, we obtain the same result in FEM when the squares are cut into triangles
-
Identify the common technical requirements for a ceremonial marriage and indicate what the consequence commonly is for failure to comply with a technical requirement.
-
On December 1, 2005 the Cone Company issued its 10%, $2 million face value bonds for $2.3 million, plus accrued interest. Interest is payable on November 1 and May 1. On December 31, 2007 the book...
-
Part 1 of 3 Required information [The following information applies to the questions displayed below] Simon Company's year-end balance sheets follow 2 points ellook Pr References At December 31...
-
DegPhi is a company that receives orders from its clients and stores it in their system. Order is done via order line, which is over the phone. Order line is used to store information on product,...
-
What challenges do economies face in light of optimal allocation and public goods? Explain in detail.
-
Go to the "Monthly Rounds and Revenue" tab. Management wants to know the number of rounds of golf played each month based on the "Participation Category" (Column D) and the monthly rounds of golf...
-
Amy produces lemonade. She can choose to produce high quality lemonade, which is more costly to her, or can produce low quality lemonade, which is less costly. Brian decides whether to buy a bottle...
-
There is a negative association between the supply of affordable housing and homeless rates in cities. If this hypothesis is correct, what change would you predict would occur in homeless rates in...
-
How many types of basic types of inventory control systems are there?
-
(3+2(-3)t t.
-
Modify the counter from Exercise 5.44 such that the counter will either increment by 4 or load a new 32-bit value, D, on each clock edge, depending on a control signal Load. When Load = 1, the...
-
In the book Modern Statistical Quality Control and Improvement. Nicholas R. Farnum presents data concerning the elapsed times from the completion of medical lab tests until the results are recorded...
-
The following MINITAB output relates to a house having 2,000 square feet and a rating of 8. a. Report (as shown on the output) a point estimate of and a 95 percent confidence interval for the mean...
-
Consider Figure 16.15(a) on page 721. Show how 2 and b2 have been calculated from 1, b1 and y2. Also, show how 27(24) in Figure 16.15(b) has been calculated from 24 and b24.
-
Consider three taxpayers who are in the following tax brackets: Alice 25% Brad 35% Camille 40%
-
Rita, a calendar year taxpayer, is an employee of the RST Partnership, which has a June 30 year-end. The partnership pays Rita a salary of 2,500 per month for the period January 1 through June 30,...
-
The XYZ Partnership reports the following items during 2022: Calculate ordinary income (or loss) by completing page 1 of Form 1065, and complete Schedule K (Partners Shares of Income, Credits,...
Study smarter with the SolutionInn App