Entries by Hannah Wangui

strings

Question (1) Prompt the user for a string that contains two strings separated by a comma. (1 pt)Examples of strings that can be accepted:Jill, AllenJill , AllenJill,Allen Ex:   Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Simon Says” is a memory game where “Simon” outputs a sequence of 10 characters (R, G, B, Y)

Simon Says” is a memory game where “Simon” outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequence. Create a for loop that compares the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a break […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Write two statements to read in values for birthMonth followed by birthYear

Question Write two statements to read in values for birthMonth followed by birthYear, separated by a space. Write a statement to print the date using the format birthMonth/birthYear. Do not end with a newline. Ex:   Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

user’s input integer into the defined variable,

Question Write a statement that reads a user’s input integer into the defined variable, and a second statement that prints the integer. Do not end with a newline  import java.util.Scanner; public class InputExample {   public static void main(String [] args) {    Scanner scnr = new Scanner(System.in);    int userNum = 0;    /* Your solution goes here */ […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"