To the mods: I'm very very sorry if this isn't allowed, please lock this if it isn't, this is the only place I could find this being okay to put for help...sorry if it's not ok.
Ok all you Computer Science experts! (I hope lol) I need some help doing this project for computer science, it's extra credit and the more complex it is the mroe credit I can get. I screwed up on a test and got some stuff backwards and lets just say my average isn't where I'd like it to be! lol. Anyway we're not THAT far into the programming so I did something I knew I could handle on my own, but after I was done I wasn't satisfied with it because of how simple it is, so can anyone help me make it a more complicated program to help get more points? Here it is:
Ok so just to help point out what it does as it is NOW:
The program asks the user basic questions, the user then inputs the data it wants (IE: "What year were you born in?" 1991) then stores the input into a variable. Later, it outputs all the data taken in into a paragraph structure and basicly gives a small summery of the person running the program.
Even without making it better, one "flaw" is that the age will only be correct if the user's birthday has already happened in the year, and I don't know how to fix that.
Thanks,
-Matt
Ok all you Computer Science experts! (I hope lol) I need some help doing this project for computer science, it's extra credit and the more complex it is the mroe credit I can get. I screwed up on a test and got some stuff backwards and lets just say my average isn't where I'd like it to be! lol. Anyway we're not THAT far into the programming so I did something I knew I could handle on my own, but after I was done I wasn't satisfied with it because of how simple it is, so can anyone help me make it a more complicated program to help get more points? Here it is:
Code:
// job profile profile.java
import java.util.*;
class profile
{
public static void main (String[] args)
{
System.out.println("The purpose of the program is to make a summary of a person by input of data.");
System.out.println();
Scanner bob = new Scanner (System.in);
// Users Name
System.out.println("What is your name?");
String name = bob.nextLine();
System.out.println();
// Users Birthday
System.out.println("What year were you born in?");
String bday = bob.nextLine();
System.out.println();
// Users Birthplace
System.out.println("What city were your born in?");
String birthplace = bob.nextLine();
System.out.println();
// Users School
System.out.println("What school did you graduate from?");
String highschool = bob.nextLine();
System.out.println();
// Users College
System.out.println("What College did you attend?");
String college = bob.nextLine();
System.out.println();
// Users Degree in college
System.out.println("What degree in college - Bachelor, Masters, or Docterate?");
String degree = bob.nextLine();
System.out.println();
// Users Major in college
System.out.println("What did you major in college?");
String major = bob.nextLine();
System.out.println();
// Todays date
System.out.println("What is todays date? MM/DD/YY");
String date = bob.nextLine();
System.out.println();
// Users Location
System.out.println("Where do you live?");
String location = bob.nextLine();
System.out.println();
// Users hobbies
System.out.println("What is a hobby you enjoy?");
String hobby = bob.nextLine();
System.out.println();
// Users Birthday
System.out.println("What year were you born in?");
int bdayyr = bob.nextInt();
System.out.println();
// Current Year
int date2 = 2008;
// users age
int age = date2 - bdayyr;
// Summary in paragraph form
System.out.println("Hello, nice to meet you " + name + ".");
System.out.println("You were born in the year " + bday + " and born in " + birthplace + ", that's a nice town.");
System.out.println("So anyway, back to you, you graduated at " + highschool + " then went to " + college + " and got your " + degree + " in " + major + ".");
System.out.println("And now you are currently living in " + location + " and you enjoy " + hobby + ".");
System.out.println("Do you know what today is?");
System.out.println("Well since you're getting old at the age of " + age + ", I'll just go ahead and tell you it's " + date + ".");
System.out.println("Hehe I couldn't resist the old joke, so sorry about that!");
System.out.println("Anyway it was nice meeting you! See ya round.");
}
}
Ok so just to help point out what it does as it is NOW:
The program asks the user basic questions, the user then inputs the data it wants (IE: "What year were you born in?" 1991) then stores the input into a variable. Later, it outputs all the data taken in into a paragraph structure and basicly gives a small summery of the person running the program.
Even without making it better, one "flaw" is that the age will only be correct if the user's birthday has already happened in the year, and I don't know how to fix that.
Thanks,
-Matt