+ 15
OOP Build a House (Assignment)
Hey im intrested in seeing some nice examples (the right way if there is one 🤔 ) of OOP using classes, Class will be called building in which you would build the house from. The house show the following when run feel free to use your own values. House address: 123 Java Road. Bedrooms: 3 Connectivity: True Gardens: 2 Parking: Garage Value: £120,000 Thanks 😀👍
21 Respuestas
+ 28
I hope to see a right way...☺️
Till then,...
My try 👇 [Ruby OOP]
https://code.sololearn.com/cbRh8EL5kF29/?ref=app
+ 13
https://code.sololearn.com/c2df2GB1JU0h/?ref=app
+ 9
Apple Blossom thats intresting does each class have its own main?
+ 8
Nice idea D_Stark here is my submission
https://code.sololearn.com/c9964enag76E/?ref=app
+ 8
Thought i would try this again as i wasnt happy with my previous attempt 😊👍.
https://code.sololearn.com/cRuClRlWwDS8/?ref=app
+ 8
Similar to Puny Programmer but with Function Prototypes.
Edit: Added a few features.
https://code.sololearn.com/WyivINOv54gZ/?ref=app
+ 7
This sounds like a real estate app. I've created one for houses using only Main Driver class as GUI.
+ 7
My attempt in C# 😅
https://code.sololearn.com/cFZ137wMm6o0/?ref=app
+ 5
this probably isn't the "right way" (although imo if it works it's the right way haha)
but here you go
https://code.sololearn.com/c2zyp9Qxj70i/?ref=app
+ 5
I had two classes actually, the driver and the external class but I slimmed down the code to only use the driver.
It's a small GUI and has some extra features in it. I mainly used an ArrayList Object for the data and a blend of File Reader/Buffer for the input from users. The rest is methods and GUI NODES. Preview is below.
https://ibb.co/mzibfo
+ 5
here's my try:
https://code.sololearn.com/cypzq7r6kodh/?ref=app
+ 5
+ 4
Puny Programmer nice
+ 3
here's another one (slightly more sophisticated than my try in C):
https://code.sololearn.com/cPAZ5Nj5OIMm/?ref=app
+ 3
reserved for my code
+ 2
Black Rose works for me
+ 2
Doll
i know rookie mistake
0
https://code.sololearn.com/cy2bE61f7ScT/#py
This works in my notebook but not on here can someone tell me why?