Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.benjaminbengtsson.grupparbetemindel;
- import java.io.Console;
- import static java.lang.System.out;
- import javax.swing.JOptionPane;
- /**
- *
- * @author Benjamin
- */
- public class DatingSite {
- public static void main(String[] args) {
- Console c = System.console();
- if (c == null){
- JOptionPane.showMessageDialog(null, "You need a console");
- }
- String name = c.readLine("What is your name?: "),
- gender = c.readLine("What is your gender? (Man/Woman): ");
- int age = Integer.parseInt(c.readLine("How old are you?: "));
- Profile dater = new Profile();
- dater.setProfile(name, gender, age);
- out.println("Your name is " + dater.getProfileName() + ", you are a " + dater.getProfileGender() + " and you are " + dater.getProfileAge() + " years old.");
- if(dater.getProfileAge() < 50 && "man".equals(dater.getProfileGender())) {
- out.println("Welcome to Pervert Finder!");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement