Varga Gergő

Greenhorn
+ Follow
since Mar 21, 2022
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Varga Gergő

So i think i did it? This is the first time I ever heard of List.of ,  I'm not sure if I was supposed to fill the empty spaces. Also I'm not sure where should i have used get,

3 years ago
I would like to thank everyone, for the help, comments, and the Docs, they are really helpfull, and im really happy , that i found and joined this community. I wasnt expecting , so much help and so many friendly people! I will try to learn a lot this week because my exam got , delayed for the next week, because our teacher , wants us to learn both the basics of File manangment , and Inheritence , I will, see how well i understand it , in the lesson , but i will definetly look through the site for more docs etc
3 years ago
Wow! Thanks for the detalied answer , i never knew this could be such a huge deal. I will try to learn OOP in my self then. Luckily i only have to spend this semester , with this Prof. I always thought test cases like that are really good since i never had them in my other classes before.
3 years ago

Junilu Lacar wrote:

Carey Brown wrote:You'd have
Where each entry is a String array of size 2.



@OP: Do you understand the reasons for this? What would you say if your professor asked you to explain this?



Hey, there excuse me , for the late reply, I' had to go, I dont really understand, we just started to learn the bacics of OOP ,and lists etc, I assume that this is a list , which stores a 2 element String arrays, i just dont know how to store them into the array and pass that string array to the List. Also , i emailed my prof yesterday, about the Map solution, and she said she can accept it , and i should just ignore the tests. I truly whish that she would have said that sooner. If you dont mind me asking , how should i fill that List? in the add method

3 years ago
So i assume , i must chnage my add method as well, and i must get rid of the Maps, if have to do the add method again, i have to use a String[] array or an ArrayList
3 years ago
All the assets equals were made by my prof :/
Thats why  i used Array list at the first time,
I thought its cam be done with Maps, i have no idea , how could i do it with Arrays
3 years ago
I tried to do that , but it didnt worked
Im supposed to make a moethod called   getItems which returns the details of actually stored recipes as a String method.
So i assume i need to return the Map somehow?

This is what the last test checks
3 years ago
Thank You for the answer
I tried it with, the maps, im able  to pass the two test, but , im not sure how should i start the 3rd part ,
"getItems (return the details of actually stored recipes as a String) method."
3 years ago
Hey There , Im pretty new to this site and , i hope im making this post right

I will have an exam this week and im practicng for it

Here is the task I have to do :
Implement the Recipes class, which handle food recipes (name, description). The class should have an add (add a new recipe), a delete (delete the given item), and a getItems (return the details of actually stored recipes as a String) method.





Here is the test file we were given by default, we have to pass all the test parts



My biggest problem is , that I' have no idea , how to store the recepies and names, i spent my whole day trying to create the (add a new recipe part ) but , i failed . I tried many option, but in every scenario, i either go over the expected size , or i dont store any data, Im not even sure, if my array type is should be String


If anyone can help a little , i would be really thankfull
3 years ago