Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

would like someone to look over my first project  RSS feed

 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey I have just picked up a book on java programming and so I don't really know anything and I am only a litttle ways into the book but i have this program. So i think i did stuff all backwards and weird and i want to know what i should have done or tips ect on So i have this little program that just intakes 4 inputs from the user and then decides if they are employable by the Sexy Dancer company (had to keep it interesting since i am learning and all) I don't think my main string should just be a bunch of object declarations.
my project is here
https://drive.google.com/folderview?id=0B4I5v3Hvwq4UcHJ0OE1BX3JtRXc&usp=sharing

Thanks for any advise
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37230
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kevin,
Welcome to CodeRanch!

That's a lot of files to click on and review. How about you post one or two of them in a reply to this post? (Use the code button on top of the text area so it formats pretty). Or post the parts you specifically would like feedback on.
 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so the program has changed a little. it now takes 3 inputs decides to hire or not then if it want to hire it decides if you should be front of house or back of house and get more information about you.
some things have odd names because this is my working example project of the things i have learned like myResume should be PotentialEmployee or just Employee..
So here is my main string a class and a sub class an interface and a method...
The program runs just fine with no errors or warnings but....
my main questions:
1. all this new stuff in my main string is that normal or did i do something wrong?
2. the interface is that even being used? what exactly does and interface d?
3 Where i call up the displayResume() why did i need to declare them to a local variable? but i never do it any where else (does this have to do with the many new tokens?) is that set up right?
4. I am not exactly sure when i need to be Capitalizing the first letter of my code.. is is for Classes? ... are my objects myResume (and its subclasses) and Hireablilty or is get an object?
(note i am intentionally not using System.outprint (or whatever that is))
Really i am very confused if any of my logic is right on building program
Sorry for all the questions but last week i didn't know java script and java programming were two complete different things.


this is my main string ^^


this gets the answer to resume and puts it into the myResume


This is what a mYResume is


this shows creates a boh of foh employee for the application based on the myResume fields

an interface for display resume??? is this function even necessary in this project?



what is means to be a boh Employee (the foh is simiiliar)
 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jesus i can't even get the stuff posted for you to look at code... heavens know how horrible the code must be then ..... any way broken the text up into the classes i have
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a thought : it is illegal in most jurisdictions to consider age as a factor for hiring. Gender and preference is also not something you want to track in a hiring database for the same reasons. Its also more difficult since Gender is no longer a two-value boolean.
 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
umm the purpose of the program isn't of any real consequence don't care if its illegal ... i am hiring only chicks that are hot and young and dude that are 18-25(or something like that)
this is just practice to see if i can make that goal happen.. not using this to actually hire people..
my goal:
To take inputs from use and create a user profile;
use the profile to determine to continue a(fohEmployees), continue b(bohEmployees) or terminate(was not hired);
then get more info from user to fulfill its class(ie get all info foh/boh needs) ;
and the to be able to call up all the info i have on all 3 user types;


but what are you saying about sex being a 2 value boolean?? the way i set it up fr you to be female you have to press y or Y in the input else you are a guy.... i don't know how to do dialog boxes or radio input or anything yet.
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I doubt your variables should be "static".
 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Camick wrote:I doubt your variables should be "static".

ya i was wondering about that one. It seems every time i want to reference my variable in a different class i have to make it static.. and the vars i just use locally i don't have to define as static... not sure what i am doing wrong that this is happening. Also when I define myResume i have to do myResume.myName = get.userInputString("what i your name"); as opposed to this.myName = get.userInputString when that work when i did this.myName = "joe" (i think i am remembering that right)
 
Rob Camick
Ranch Hand
Posts: 2800
15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems every time i want to reference my variable in a different class i have to make it static


You should not be accessing the variable directly. If you need the data from the variable then you need to create "getter" methods.
 
Kevin Beier
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So every time I take the the userstring and set it to a value in my resume I need to be doing something like myResume(userstring) and have that set to assign it locally within myResume?...if so why is the way I am defining them bad?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!