Cody Biggs

Ranch Hand
+ Follow
since Jun 21, 2016
Cows and Likes
Cows
Total received
1
In last 30 days
1
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
4
Given in last 30 days
1
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Cody Biggs

Well I appreciate that Knute and Piet. Of course being sick does not do me any favors. I have learned quite a bit from everyone here, and I appreciate everything y’all have done.
1 day ago
Yes calling setMajor worked perfectly!
1 day ago
Fixed it by turning it into a button and using a lamda expression
1 day ago
The line is my collections.sort(students, new Person.firstNameSorter()); in the college class. So line 34

College class
1 day ago
Ive never seen that... but on the line my collections.sort it says
Multiple markers at this line
- Syntax error on token ",", = expected
- Syntax error on token "(", Identifier
expected
- Syntax error on token ")", delete this
token
1 day ago
So, here would I put it? My person Class now looks like



and the array is in the College class I tried. But I get red lines that say "Delete )", "Delete (", and " = expected"
1 day ago
I fixed it. Or you could say found a way around it. Still works the way I want it to the only problem is im not reading from a file for the students loaded in. Instead I just set the major to "undeclared", and later in the program the students have the option to change that.

So now for my next question...sorting. For some reason this has been a real struggle for me, although I sorted everything right for my previous assignment. For this one I just want the arrayList<Students> sorted, so when the list view loads up all the names are sorted. Problem is that my student class holds no first name, last name they get that from the Person Class which they inherit. Both student and instructor inherit Person, but thats not important right now. I tried making person implement Comparable<student> but fussed that forst name is not visible as its set to private. Do I want to make that public for the sorting? Or is it better left private? Then I tried implementing a comparable<Student> in Person but when I did


It fussed that - is undefined for them. I just want to sort by firstName, simple sort. am I doing it in the wrong Class? I just thought since they get everything from Person that, thats where it should be

Here are my classes just incase. The person only shows the first name in the listView because of ways I had to return the names. Doesnt matter whats showing just as long as I have a sort, and the full student is shown when selected from the list. Again probably not Important
Person


Student


College where the student list is loaded

1 day ago

Piet Souris wrote:This topic goes on and on. I tried to import all of the code into my NetBeans, but I am missing some classes, and there is a lot of code snipping going on, so that didn't work. All We can do is guess the answers to your problems.

Can't you give a full listing, including everything?

Then:

Cody Biggs wrote:Well it does. The code gets the major name which is set to undeclared. Change the major textfield gets the new major, and sets it to majorName. but when that window closes it goes back to undeclared


Since the student is known here (is it?) why don't you simply do 'student.xxx(change)'   (set the new major here with the correct Student method).



Yep I’m an idiot. I was so focused on the two text fields I didn’t pay attention to anything else
2 days ago
Well it does. The code gets the major name which is set to undeclared. Change the major textfield gets the new major, and sets it to majorName. but when that window closes it goes back to undeclared
2 days ago
The application is always running. I’m not ending the program when I close the window. Each student is selected from a list, and then opens a new window to show the student. So when I change the major the original major textField should be updated. When that window is closed and selected again from the same running application it shows the new major.

Knute said something about making my list views accessible?
2 days ago
So I have two text fields one thats shows the students major, and one for them to enter a new major. When the button is hit I want the new major to replace the original major. Which we already did, but when I close the student window the major goes back to normal. I want to save that major change, so even if I close the window the new major will be there when I open the student again.

2 days ago
still need help with this one
2 days ago


2 days ago
load majors is in my main app


my majors file looks like Computer Programming,true,ENG-101,CPT-102,CPT-167,CPT-187,CPT-172,CPT-242,IST-272,CPT-237,CPT-244,CPT-239,IST-238,CPT-270,MGT-270,MAT-110,CPT-262,ACC-101,IST-190,CPT-283,IST-204,CPT-210

but load majors only takes the first line, so it would be Computer Programming, Database, Accounting...and so on
2 days ago
Well then I am even more lost I have a list of students like
Cody, Biggs, Computer Programming

and the majors in my list look like
Computer Programming
Database
and so on

so when Student gets my students major from the constructor, and when the major is Computer Programming, and the major in the catalog is Computer Programming..how am I getting a null?

2 days ago