• Post Reply Bookmark Topic Watch Topic
  • New Topic

Finished Java class  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I just finished my first class in java and I feel like I learned next to nothing.  Maybe the basics.  I want to continue learning it on my own now and want to create a program for work that is basically like this:
-A user logs in
-Fills out several fields
-Fields get saved

And this is where I'm not sure how to continue:
-These fields get saved into a database (sql?) that the fields can be sorted out in different ways.  I wouldn't mind learning sql along the way if that would be the most convenient.
-Email out the program through outlook

Also, I'd like to create a gui and several programs built into one that is just like the above.   Possibly a tabbed program where you have program 1 with different fields, program 2 with also other fields and program 3 with other fields. 

I'm looking if someone can point me in the right direction for any of the above that can help my learning journey along the way.

Thanks in advance.
 
Ranch Foreman
Posts: 3068
37
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Baby steps.

That description covers a lot of ground, so I would suggest taking it a bit at a time.

For example, you should be able to write the basics of this without a GUI or database, using the console for input (Scanner).

Try and keep the interface detached from any "business logic", that way when you do start with a GUI you will find it easier to swap out the old interface with the new.

After that you can add some persistence...possibly starting simply with a file on disk.
Again, try and keep the persistence logic detached (use interfaces), that way when you do add a database instead you should be able to just swap out that side of things.

Essentially, try not to do this all at once as you'll get your knickers in a twist.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell us what you have been taught and what you know. Also tell us how long your teaching went on for.
 
karol siwik
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appreciate the advice guys.  Ok, baby steps.  My teachings went on for 8 weeks and covered arrays, for loops, if statements, file streaming and using other methods from different classes.

Thanks guys.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That covers a lot more ground than you think. Show us the neatest way to implement the following statement:-
If the grade is less than 40, print “fail,” otherwise print, “pass.”
Assume the grade variable has already been declared. That should give us a hint about how much you know. It will also show us whether you know any coding style.
 
karol siwik
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if (grade < 40) {
  System.out.print("fail");
}
else {
  System.out.print("pass");
}
 
Sheriff
Posts: 4289
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks good!  (Minor point: please UseCodeTags [that's a link])

Do you know how to use the Scanner class to get input from the keyboard?  (Technically, from the standard input.)  If not, do you know how to lookup the API documentation for Scanner?
 
Sheriff
Posts: 4930
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
karol, no worries, doctors have examining instincts in their venous, anyway, you know why? Because they can now is weekend, please give some time to respond, Campbell might be busy.
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was helping at the beer festival at S******n.

That is nicely formatted code, but there is a much shorter way to print those outputs.
When Liutauras asked about keyboard input, let's reduce that to a method which will return an int from input to System.in and which will never throw an input mismatch exception. Rob Spoor taught me how to do that a long time ago.
 
karol siwik
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Haha no worries there's no rush to get this done anytime soon anyway.  I just wanted to keep practicing Java and continue learning it outside my regular work/school.  I really appreciate the help. 
So far I was able to create one of those programs where I can take the users input and was going to output into a text file and I stopped there.  What I mean by programs is similar to "Sheets" in Excel. 
Sorry about the code tags!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!