Economics homework help
Economics homework help
Develop a program that first requests its user to supply a first name. After reading the first name, the program requests its user supply an age. After reading the age, the program prints out a tasteful complement based on the supplied age and personally addresses the user by name.The compliment must indicate that the user looks an age that is between two – five years less than the supplied age. A random number generator object will be used to generate the number to subtract from the user’s supplied age. I was wondering if someone could assist me with this assignmentHere is what I haveimport java.util.Random;import java.util.*;public class Compliment {public static void main(String[] args) {age(null);Scanner console= new Scanner(System.in);}public static void age (Scanner console) {System.out.println(“Enter your name:”);System.out.println();String name=console.nextLine();System.out.println(“Name is: ” + name);System.out.println(); System.out.println(“Enter your age:”); int age=console.nextInt();Random rand = new Random();int randomAge = rand.nextInt(9);int compAge= age-randomAge;System.out.println(“Come on” + name + “you don’t even look like” + compAge);}}
“Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!”
The post Economics homework help appeared first on Coursework Geeks.
Develop a program that first requests its user to supply a first name. After reading the first name, the program requests its user supply an age. After reading the age, the program prints out a tasteful complement based on the supplied age and personally addresses the user by name.The compliment must indicate that the user looks an age that is between two – five years less than the supplied age. A random number generator object will be used to generate the number to subtract from the user’s supplied age. I was wondering if someone could assist me with this assignmentHere is what I haveimport java.util.Random;import java.util.*;public class Compliment {public static void main(String[] args) {age(null);Scanner console= new Scanner(System.in);}public static void age (Scanner console) {System.out.println(“Enter your name:”);System.out.println();String name=console.nextLine();System.out.println(“Name is: ” + name);System.out.println(); System.out.println(“Enter your age:”); int age=console.nextInt();Random rand = new Random();int randomAge = rand.nextInt(9);int compAge= age-randomAge;System.out.println(“Come on” + name + “you don’t even look like” + compAge);}}
“Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!”
The post Economics homework help appeared first on Coursework Geeks.