Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Darko Jakimovski

Ranch Hand
+ Follow
since Nov 01, 2018
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
17
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Darko Jakimovski

Either way there is a lot of manual labor involved I guess... In each case I'll have to manually map the values with types or get them as Strings and parse them when getting them back which would slow down the process. Sigh...
So I got this project that i need to start working on where they need better control and filtering of their answers on Google Forms, so I want all of the submissions to be saved in a DB. My initial worry from the start is that the database is gonna be really hard to set up. There are like 25 pages of it with 4-5 answers on each page. It's about documenting cases of violence. Any ideas would be much appreciated.

Long time no see guys I passed my OCA btw <3
Thanks Jan, I'll keep it in mind for next time. The interview passed and I flunked it big time. The tasks were not what they said they were gonna be on the phone... They gave me 2 poorly (Junilu Lacar was soooo right about this) written project specifications  containing stuff I've never tried out before, like using dependency tools and a lot of SQL to finish within 3:30 hours. So... yeah... That's that. At least I got the idea of what's expected from an intern I guess
2 years ago
Thanks for the advice Junilu Lacar, constructive as always. Cheers!
2 years ago
So I got an internship interview scheduled monday they told me that after the interview I'll have 3 and a half hours to write some algorithms. Any idea what should I expect? They gave me no hints. If any of the experienced members of the ranch write such tasks I would be grateful if you gave me some advice cause I'm super excited to be honest.
2 years ago
Thanks Campbell, you saved the day! I found everything I needed in that book! Cheers man, you are a beast!
2 years ago
I clearly formulated my question wrong. Let's say that we have an interface called Shape, and a void draw() method, three classes implement the Shape interface: Circle, Square and Triangle from there we have a class called ShapeFactory which has a method getShape(Shape shape) that has an Enum parameter and based on the given argument the method returns an object of the corresponding type. My question is, how do I initialize any additional fields of a subclass object in this case? Is that even possible?
2 years ago
So I managed to do Builder Design with subclasses but the constructors are public and every concrete class has a Builder class so all I'm doing is not using constructors. My mentor told me that I can use the Factory Design Pattern but I can't figure out how to initialize the additional field of the child classes. Is this doable? and if yes, how?

Here are a couple of the classes related to the problem





So If I have let's say a PersonFactory how do I initialize the additional fields when getting a Client object from the factory? If I add ALL the field in the factory for all my classes the code is prone to throw NullPointerException :/
2 years ago
Thank you so much Liutauras Vilda, you're sooooo right. I'm still readjusting the fields as I go. Now I'm stuck on something called recursive generics If I don't manage I'll open another topic. Cheers.
2 years ago
Thanks Knute, it did make sense and gave me ideas. Cheers
2 years ago


This is what I got so far but I know it's not right and need some help
2 years ago
So I started doing a bank app and I want an CheckingAccount to have it's balance increased for a certain amount after a certain period. How do I do that? Do I save the previous  Date when it was modified and compare it with the period? I have no idea :/
2 years ago
Thank you so much Junilu, this time you gave my a lot to chew on. I'll go through as much as possible of Martin Fowler and Eric Evan's research on the subject. You sir have my gratitude.
2 years ago
Yeah I tried posting the images but no preview was available, that's why I'm posting the links...

I thought about the account number being recorded in the account itself but it just struck me that I used an interface... Maybe I'll change that to an abstract class so I can do that. Also maybe have a different NumberGenerator class that will generate account numbers, client IDs, employee IDs etc...

I'll work on it some more and post again, thanks for the feedback Campbell.

2 years ago
So guys this is what I got so far, there are still a lot of things I need to cover. Am I going in the right direction?

https://imgur.com/2QlH0Sl
2 years ago