Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!

Johny Sougiospitos

Ranch Hand
+ Follow
since Oct 29, 2019
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Johny Sougiospitos

I think i found a way to put student to courses.. I do not know if it is the best one out there... But at least it shows that i tried.
2 weeks ago

Liutauras Vilda wrote:I suggest you post full instructions you were given, and the code templates you were given without any of your additions. There is a chance you misunderstood, misinterpreted stuff.

Give guys to have a look so could give an opinion whether it is too hard.

Which course you are at once again? Which year?

ok...Teacher gave us this and asks:

the user should be able to put data in the classes or if he doesn't want to put data to use existing ones..

1.create the classes with setters/getters
2. print the lists of students/courses/trainers/assignments
3.print the students per course
4.print the trainers per course

so as you see he doesn't give us many,i do not tknow what i exactly i have to do and try to imagine what this program should probably do

that's the exersice..As for me ..i am studying Java for 1 month and teacher told us to use List/Arraylist to solve it
2 weeks ago

Campbell Ritchie wrote:

Johny Sougiospitos wrote:   thanks for all the help . . .

That's a pleasure I am sorry that your exercise didn't work out.

Although I only played a small part in this discussion, we really were trying to help. Giving you too much information or a complete solution wouldn'tt have helped you, so I think your allegation in your last post is unfair to those who have put a lot of effort into this discussion.

sometimes though giving a solution helps if the other can't solve it...and then i would remember what i have to do if a similar problem occurs..

Anyway i am still trying to figure out what to do here
2 weeks ago

Carey Brown wrote:

Johny Sougiospitos wrote:Teacher told us to have a list with courses and the user can only add othe courses not delete..
So if the user doesn't want to add a new course ,he/she must choose from the existing ones..
that's the reason i was thinking the "code" i wrote before

Well, if you want to pre-fill courseList with hard-coded courses, that's fine, it's just that the code you write shouldn't be dependent on that.

it becomes hardier and hardier!!!
2 weeks ago

Carey Brown wrote:
This is too hard coded. Presumably your School class has a List<Course> courseList. You can write a generic method that allows a user to select one of the available Courses.
This will work when you add and delete courses.

also, i don not quite understand your code..can you explain it to me??and why is it necessary the "to String" method?

Teacher told us to have a list with courses and the user can only add othe courses not delete..
So if the user doesn't want to add a new course ,he/she must choose from the existing ones..
that's the reason i was thinking the "code" i wrote before
2 weeks ago

Carey Brown wrote:

Johny Sougiospitos wrote:the "ManageStudentCourseRelationship" is the name of the method???Large name!!

Actually, the name of a class.

i got's something like the middle class my teacher said "StudentPerCourse"
2 weeks ago

Carey Brown wrote:This is just not an easy problem, no matter what your instructor says.

you believe that what i am thinking to do difficult/easy/stupid?

2 weeks ago code is that

this is the point i must create a method in Class Course -perhaps- to do the things i told you.. how should i use what you purpose??

---My head is gonna explode soon--

2 weeks ago

Carey Brown wrote:

Johny Sougiospitos wrote:i can use Course1.addStudent right?

This is where I'd use ManageStudentCourseRelationship.

the  "..." what's supposed to mean??
the "manageStudentcourseRelationship" is the name of the method???Large name!!

can you please write it more detailed??

you mean in the school Class -which is tthe main-- write that method?

i can see what you want to tell me but it seems i am not as good as you in the code writing..
and i think i should be write simpler code since i am beginner.
2 weeks ago

Carey Brown wrote:
The scenario that I can think of is if you want to enroll one student in one class.

Same applies for selecting a Course. Display a numbered list of Courses and let the user choose one. If you wanted to get fancy I suppose you could let the user select multiples and return a list but I'd stick with the basics first.

that's what i am trying to have a list of courses like Maths- computer science etc and make the user choose which one/ones he wants..and with his option to have something like
if choice =maths
then math.addstudents ++;
else choice = computer science
else if (choice == maths ) and (choice== computer science)
and when i print them should be something like
Carey etc

but i can't write the specific code..i am confused
2 weeks ago

Carey Brown wrote:

silly a similar way i print the list of all students..

why should the user select one student??

and one thin i just thought...if in Class Courses i create a method addStudent (return Student) doesn't that work with Course1,course2 etc? i can use Course1.addStudent right?
2 weeks ago

Carey Brown wrote:I'm not entirely sure how StudentsPerCourse is supposed to work but here's a stab.
Then in School you might have
Then to pick a Student to display all the courses they are enrolled in
Loop through all the students and display the List to the user as a numbered list and let the user choose the student number.

Then, using the student number get the Student reference. Using the Student reference loop through your studentsPerCourse and find all entries where 'student' matches your Student reference and then print the course associated with that.

This should work but this alone is at least an hour to implement and debug.

that's where i am confused and i do not know what to do
in Class StudentPerCourse i have that

and that i do not know how it is supposed to help me!
and what kind of method to create with what kind of loop
2 weeks ago
i showed them as lists because teacher told us to do so...i am still trying to solve it without success anyway..
The classes are the ones i created..Student/Course/Trainers

until now i can add and print the entries in each of these classes

To print Students per Course teacher told us to create a middle Class called "StudentPerCourse" and this is where i am getting confused..Let's say that the COURSE class has 2 courses like Algebra and Geometry.
in COURSE class i declare as
Course c1 = new Course("Algebra");
Course c2 = new Course("Geometry;

i can not figure out a way of how to present the students of each course...and that is what i can't do 5 days now

can i write something like that:

"Which course you want: Algebra or Geometry?"
"for Algebra press 1 and for Geometry press 2"
if option =1 then add student to course c1'
that's what i can't do

if i could do that then i thonk it would be easy to print students per course.

can you help me with the code here please???
That's the point i can't think anything and i am crying 4 days now

---i hope there will be not another project like that--i am gonna die ----
2 weeks ago
i believe that you never intended to help me...
Anyway it's my loss sinve i can't solve this exercise//and i am mad becuse teacher told us that this exercise will not take us more than 1 hour...and i am trying to solve it 5 days!  
2 weeks ago
  thanks for all the help you guys gave me but i am quitting.i can not solve this exercise..i can't figure out how to do the things this exercise asks and deadline ends tomorrow.
i am sorry that you lost your time with me    
2 weeks ago