So I'm taking a class requiring the use of Netbeans which I've never touched before. Never had any java programming experience either. My instructor has already said that if you aren't familiar with Java already that this class will be very difficult....
That said I'm NOT looking for someone to do my homework. My problem is that I understand some of the concepts of what's required but not how to code it. The reading ends up meaning nothing to me and I seem to get maybe one fuzzy concept out of an entire chapter of reading. So in other words "help".
My assignment is as follows:
• Create a console program that prompts the user to enter the name and address of their employer and position they hold or the name and address of their favorite restaurant and their favorite meal.
• Display this information on the screen, each on a separate line.
• Run your modified program and take a screenshot of the results.
Here's what I understand from this:
- a scanner would have to be loaded to allow user input and should look something like this:
1 // Fig. 2.7: Addition.java
2 // Addition program that displays the sum of two numbers.
3 import java.util.Scanner; // program uses class Scanner
5 public class Addition
7 // main method begins execution of Java application
8 public static void main( String args )
The text I have (Java How to Program: Late Objects Version, Eighth Edition) only seems to point out how to do this with int values. I'm not finding anything that instructs me on how to code when I want to use characters other than numbers (though I think I'm referring to strings, I'm not sure).
I'm fairly confident if I could properly code the scanner that I could manage to get the required inputs (name & address of employer etc...) figured out. I'm also in the dark about how to get the outputs to print to multiple lines but I think I get the general idea of printing (system.out.print ?).
If it sounds horrible I apologize but my brain is fried and I just spent 5 hours listening to live chats that led nowhere and reading a book that might as well be written in Japanese if you're a newbie to Java code.
Any and all help will be greatly appreciated but you're gonna have to dumb it down for me.
Thanks in advance.