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
-
arter investments needs to develop an investment portfolio for Meena Singh from the following list of possible investments. Investment Cost $10,000 $12,000 $3,500 Expected Return $800 $900 $400 TIT...
-
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?
-
Suppose organisms grow in mass according to the differential equation dM /dt = t n where M is measured in grams and t is measured in days. For each of the following values for n and , find a. The...
-
How does the normal shock affect (a) The fluid velocity, (b) The static temperature, (c) The stagnation temperature, (d)The static pressure, and (e) The stagnation pressure?
-
Earlville Corporation reported net sales of \($300,000\), \($330,000\), and \($360,000\) in the years 2000, 2001, and 2002, respectively. If 2000 is the base year, what is the trend percentage for...
-
Assume that a Rocket Burger restaurant has the following perpetual inventory record for hamburger patties: Requirements 1. At February 28, the accountant for the restaurant determines that the...
-
Your utility company charges 11 cents per kilowatt-hour of electricity. Complete parts (a) and (b) below. a. What is the daily cost of keeping lit a 150-watt light bulb for 14 hours each day? b. How...
-
The September bank statement and cash T-account for Terrick Company follow: There were no deposits in transit or outstanding checks at August 31. Required: 1. Identify and list the deposits in...
-
Write a response to the following question. What warnings would you give forecasters in using statistical demand equations for estimating consumer demand? How can the problems associated with using...
-
While each of the financial statements is likely to aid in any business decision, it is often the case that a particular financial statement may be best suited to help in a particular decision....
-
Assess the authors opinion that change agentry will most likely become the largest and most important part of intra-organizational IS work in the future.
-
Consider the likely reaction of colleagues you have worked with to a system such as KMS. What type of reaction would you expect? What types of incentives would be necessary to encourage information...
-
Assuming different stages of growth in different countries, what might be the appropriate role of the central IT group in a large multinational organization?
-
At the beginning of the year, Logan Services purchased a used airplane for \($65,000,000\). Logan Services expects the plane to remain useful for 4 years (6 million miles) and to have a residual...
-
21. [0/2.27 Points] DETAILS PREVIOUS ANSWERS WANEFMAC7 3.3.056. MY NOTES ASK YOUR TEACHER PRACTICE ANOTHER Jennifer's pension plan is an annuity with a guaranteed return of 5% per year (compounded...
-
Interview managers at three companies in your area about their use of ERP. How have their experiences been similar? What accounts for the similarities and differences?
-
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.
-
Decade Petroleum incurred and paid the following costs during 2016: Record Decade Petroleum's transactions. Lease A Unproved Lease B Unproved Lease C Proved Lease D Proved Purchased Acquisition costs...
-
The Kincaid Oil Company has unproved property costs of $40,000 at January 1, 2016. During 2016, Kincaid incurred $400,000 drilling costs on Lease A. An 8%, $500,000 note is outstanding during the...
-
Duck Petroleum hires a drilling contractor to drill a well to the depth of 8,000 feet at a cost of $300,000. The $300,000 cost includes $5,000 for surface casing. Any drilling to be completed after...
Study smarter with the SolutionInn App