need some really quick help
1. Create a class called ValentinesDay
2. Declare the following 6 variables, choosing the appropriate data type. Must use at least one of each data type listed here: String, int, double, char, boolean [2 pts]
datesName
gender (must be single character, m=male, or f=female)
restaurauntName
numberOfRoses
totalSpent
feelingLucky
3. Using the Scanner class, prompt the user to enter the values for ALL the variables. [2 pt] (Note: If you decide to just hard-code the values only and not read keyboard input, then you can earn 1 point)
4. Print all the info about your Album to the screen, similarly as follows [1 pt]
Example Interaction with Program: (the blue text represents keyboard input)
What is your dates name?
Oprah
What gender is your date?
f
Where are you taking your date?
McDonalds
How many roses are you bringing?
1
How much do you plan on spending?
12.50
Are you feeling lucky?
true
Example Output:
------------------------------------
My Valentines Day Details:
-------------------------------------
Name: Oprah
Gender: f
Place: McDonalds
Number of Roses: 1
Total Spent: $12.50
Got Lucky: true
-------------------------------------
here is what i have so far....sorry i dont post in correct format
import java.util.Scanner;
import javax.swing.JOptionPane;
public class VelentinesDate {
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
double totalSpent;
int numberOfRoses ;
char ;
String datesName1, restaurantName ;
System.out.println("What is your dates name?");
datesName1 = keyboard.next();
System.out.println("What gender is your date?");
System.out.println("Where are you taking your date?");
restaurantName = keyboard.next();
System.out.println("How many roses are you bringing?");
numberOfRoses = keyboard.nextInt();
System.out.println("How much do you plan on spending?");
totalSpent = keyboard.nextDouble();
Boolean lucky = true ;
System.out.println("Are you feeling lucky?");
}
}
2. Declare the following 6 variables, choosing the appropriate data type. Must use at least one of each data type listed here: String, int, double, char, boolean [2 pts]
datesName
gender (must be single character, m=male, or f=female)
restaurauntName
numberOfRoses
totalSpent
feelingLucky
3. Using the Scanner class, prompt the user to enter the values for ALL the variables. [2 pt] (Note: If you decide to just hard-code the values only and not read keyboard input, then you can earn 1 point)
4. Print all the info about your Album to the screen, similarly as follows [1 pt]
Example Interaction with Program: (the blue text represents keyboard input)
What is your dates name?
Oprah
What gender is your date?
f
Where are you taking your date?
McDonalds
How many roses are you bringing?
1
How much do you plan on spending?
12.50
Are you feeling lucky?
true
Example Output:
------------------------------------
My Valentines Day Details:
-------------------------------------
Name: Oprah
Gender: f
Place: McDonalds
Number of Roses: 1
Total Spent: $12.50
Got Lucky: true
-------------------------------------
here is what i have so far....sorry i dont post in correct format
import java.util.Scanner;
import javax.swing.JOptionPane;
public class VelentinesDate {
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
double totalSpent;
int numberOfRoses ;
char ;
String datesName1, restaurantName ;
System.out.println("What is your dates name?");
datesName1 = keyboard.next();
System.out.println("What gender is your date?");
System.out.println("Where are you taking your date?");
restaurantName = keyboard.next();
System.out.println("How many roses are you bringing?");
numberOfRoses = keyboard.nextInt();
System.out.println("How much do you plan on spending?");
totalSpent = keyboard.nextDouble();
Boolean lucky = true ;
System.out.println("Are you feeling lucky?");
}
}
