This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello, I dont need help per se', I need to know if my logic or way of explaining how this code works is correct. I have code to delete a member record. I got most of it from my instructor's notes though I had to modify it to work with my program. There is an integer that a user enters called menuQuestion. MenuQUestion 3 is an option to delete a member. All the member data is held in individual arrays. Here is the snippet of code;
Am I right in saying the following? What this code does is make the variables unsearchable by taking them out of the slot they are in. So if fname is increased to fname , then it's no longer searchable in the spot it was originaly put in. Its essentially been removed but still there....sorta. Make sense?
> All the member data is held in individual arrays.
as a separate exercise to what you're doing now, have a go at making a class Member with fields of what the arrays represent.
then you can make an array Member members = new Member; and members[count] = new Member(..,..,..,etc);//in a loop or whatever
much easier to work with.
Joined: Jul 26, 2006
Oh im already done. Im just tired of "kinda sorta" understanding how things work. This is a program thats turned in. It works, and works fine..id just like to know im on the right track as far as "how" it works.
This code is incomplete, so I'm not sure how this would actually work.
My guess of what's intended is that when record is deleted, every record above it should be moved down one slot. For example, if the record at index 10 is deleted, then the record that was at 11 is moved to 10, the record that was at 12 is moved to 11, the record that was at 13 is moved to 12... And so on.
That's not what would happen with the code as posted, but it looks like that might have been the intent.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: Jul 26, 2006
THank you Marc. You most likely (unless i continue with Java) not be hearing from me again. I want to say how much I appreciate the honest help you provide here and how impressive all of your accomplisments are. This is not an easy language by far so excelling at it says something about you guys. Thanks again.