matthew reid

Ranch Hand
+ Follow
since Feb 15, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by matthew reid

hello everyone

i am making a real estate program. at the moment i enter in all the property details and save it in an array. i was wondering if i could make a combo box containing a list of all the addresses in the array so that i can select a property to add an offer to it. at the moment i have it so i need to type in the address again in the offer box but its saved in a separate array but i want the offer to be connected to the sale. im having trouble finding help with this type of situation.
6 years ago
ok i changed the class names and changed the variables, removed the extends, made a Person class, would i be correct to made a sub class for Person called Agent and put the variables for commission.

here is what i got




6 years ago
i was going to do the sub classes because i thought that was how things are done. if i was to make this program for real use i would want each client and real estate agents stored in the database.

the reason im having so many problems is because my teacher is useless. and im doing this as distance education.

i was aware of the finalised method. im starting from scratch in my java book again to try get other things to sink in better and hopefully i will understand things differently now
6 years ago
this is what i got





im assuming the seller is the owner. i was going to make a super class of People, then have sub classes coming from that of Agent, and Client, then Buyer and Seller as sub classes of Client.
6 years ago
hey everyone,

im trying to understand something about classes better. not exactly sure how to explain exactly but ill give it a go.
just say i have a class named property which has variables such as street, size, toilets, bed rooms and so on, then say i have another class named sales,  which will include owner name, phone, sale price. what i want is to join them together. i understand how this could be done by sales extending property and using tostring and super.tostring. but can i join them without doing it this way.

hopefully someone can understand what im talking about

i have made 3 classes. the super class property and 2 sub classes of salesoffer and purchaseoffer. but the problem is salesoffer isnt a property and purchaseoffer isnt a property. everything works the way i want it to work but i know its the wrong way to do it.

anyone please help
6 years ago
hello, im trying to make a method to search an arrayList and then if the object is found put a copy of that into another array so i can display all the matches.

this is what i have got. everything compilers and i dont get any runtime errors but ti does nothing and i cant find any decent guides to help solve my problem.

6 years ago

Liutauras Vilda wrote:
Why SaleOffer extends Property? SaleOffer IS-A Property? What is that Property?



should I have all saleOffers and purchaseOffers all in the property class instead of having each class

And please tell now, where exactly your problem is?



my problem is when it reads the file the string cant be converted to Boolean and I cant figure out the date



Just a thought on this. Isn't this the exact use case where we can directly use serialization?



never heard of this before so I didn't know

Why propAddress, propType propArea, numRoom, numToilet numGarage are in SaleOffer class and not in Property?



these are in the property class



6 years ago

Objectives

• Develop a Java GUI application using layout managers
• Develop an application that uses two or more classes
• Read and/or write from/to text files
• Use search algorithms and/or sort algorithms
• Use ArrayList or LinkedList or any other data structure

General

In your assignment 2, you can continue to develop the Java GUI application that you have created in your assignment 1. If you would like to modify the codes that you have submitted in your assignment 1, you are free to do so. You can adopt any layout patterns that are suitable for the requirements of the application in your assignment 2.  

Assignment Task specification

CQRE has requested you to help them finalize the property sale deal based on the following rules:
1. Identify the purchase offer that has the highest offered amount for a property sale offer.
2. The identified highest offered amount should be at least 90% of the seeking price of the sale offer.
3. In case of matching amount of purchase offers, the decision is up to the seller.
4. Purchase offers are not allowed after a property sale is finalized.

CQRE also wants to view the commission amount receivable for each of the property sale that has been finalized.  Hence, you need to store the relevant details in text file(s) and also to provide appropriate searching facilities to display the details of finalized property sale(s) which have been assigned/managed by the given employee.

Hence in addition to the requirements of the assignment 1, the software application that you will develop in assignment 2 should perform all of the following:

1. When the application is started, it should read the details of the property sale offers from the existing text file(s) and display the latest property sale offer.
2. The application should provide control(s) to finalize the property sales.
3. The application should provide details of all finalized property sales including the commission amount receivable.


4. The application should provide necessary controls to search and display the details of finalized property sales which have been assigned/managed by a given/selected employee (details to be obtained from/ selected by the user). If the search criterion is not met then an appropriate message has to be displayed.
5. The application should have the facility to append/save the details of new property sale offers and respective purchase offers and finalized status (finalized or not) in relevant text file(s).

In order to include these additional changes in the Java GUI application, you may need to do any or all of the following:
• develop additional Java classes
• extend the existing Java classes that you have developed for your assignment 1
• implement newly created interface(s)

For the assignment 2, you may need additional controls and you are encouraged to develop your own GUI layout.  Please note that you can create the required text file(s) through your application program for storing the data initially. During the subsequent run the same file(s) can be used by your application appropriately.


6 years ago
Hello I'm trying to remake an object from a text file. I think I got most of it to work but I don't know how to make a Boolean from a String or LocalDate from a String. Is it even possible?

6 years ago
that looks like something i can work with thanks
6 years ago
the plan was i store all the details of a property sale into each array element. also the same done for making offers on a property. then i wanted 2combo boxes so i could select the address for sale and the offer price from comboboxes then i need to modify the property details to finalized and i wanted to join all the details together.
6 years ago
hello

i have a problem i cant seem to solve. i have a real estate gui where you enter in details of the property and price ans so on,
it saves all those details in an arraylist and i can view them all toString(), what i want to know is it possible to access that
object in the arraylist and display each category in there own textfield. what i had planned was a JComboBox of all the Addresses
and once the address is selected all the other textfields will fill with all the details of the property, so it can be modified or added to.

thanks for checking this out
6 years ago
I should also add I only want the combobox to display the address in the first box and the price in the second box
6 years ago
hello everyone

I'm trying to put an arraylist of objects into a jcombobox. but I cant find any information that is helping me do this



I'm getting this compile error

Test.java:82: error: no suitable constructor found for JComboBox(ArrayList<Property>)
JComboBox finalizeAddressComboBox = new JComboBox(salesArray);
                                   ^
   constructor JComboBox.JComboBox(ComboBoxModel) is not applicable
     (argument mismatch; ArrayList<Property> cannot be converted to ComboBoxModel)
   constructor JComboBox.JComboBox(Object[]) is not applicable
     (argument mismatch; ArrayList<Property> cannot be converted to Object[])
   constructor JComboBox.JComboBox(Vector) is not applicable
     (argument mismatch; ArrayList<Property> cannot be converted to Vector)


everything worked fine until I tried to put in the jcomboboxes. any help would be much appreciated. thanks
6 years ago
thanks for the reply ill look into that more and try it
6 years ago