Question

follow the To Do list in the comments to finish the program, and send a response...

follow the To Do list in the comments to finish the program, and send a response to this topic with your .class files attached. Also, please include your name in the output as the program's author.


/* Week2 in-class exercise
   Name: myName.java
   Author: 
   Date: 

*/

//import the Scanner class to get user input
import java.util.Scanner;
public class myName {

        public static void main(String[] args) {

                


                //  TO DO:
                //
                //  a. Create a new Scanner to get user input

                //  b. Prompt the user to get the name

                //  c. Get user's name input and assigned to a name variable
                
                //  d. Display a welcome message, such as:
                //  "Hello, name, welcome to BIFS618!" 

                System.out.println("Author: Your Name");

        }
}

Homework Answers

Answer #1
/* Week2 in-class exercise
   Name: myName.java
   Author: 
   Date: 

*/

//import the Scanner class to get user input
import java.util.Scanner;
public class myName {

    public static void main(String[] args) {






        //  a. Create a new Scanner to get user input
        Scanner scanner = new Scanner(System.in);

        //  b. Prompt the user to get the name
        System.out.print("Enter your name: ");
        
        //  c. Get user's name input and assigned to a name variable
        String name = scanner.nextLine();

        //  d. Display a welcome message, such as:
        //  "Hello, name, welcome to BIFS618!"
        System.out.println("Hello, "+name+", welcome to BIFS618!");

        System.out.println("Author: Your Name");

    }
}
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
follow the To Do list in the comments to finish the program, and send a response...
follow the To Do list in the comments to finish the program, and send a response to this topic with your .class files attached. Also, please include your name in the output as the program's author. /* Week2 in-class exercise Name: Average.java Author: James Gao Date: 01/10/2010 */ public class Average { public static void main(String[] args) { double grade1 = 76.0; double grade2 = 83.0; double grade3 = 62.0; // TO DO: // // a. Compute and display the...
Fix the program: what if the input is three? import java.util.Scanner public class Test { public...
Fix the program: what if the input is three? import java.util.Scanner public class Test { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Enter an integer: "); int m = in.nextInt(); System.out.print("Enter another integer: "); int n = in.nextInt(); System.out.println(m + " " + n); } }
Covert the following Java program to a Python program: import java.util.Scanner; /** * Displays the average...
Covert the following Java program to a Python program: import java.util.Scanner; /** * Displays the average of a set of numbers */ public class AverageValue { public static void main(String[] args) { final int SENTINEL = 0; int newValue; int numValues = 0;                         int sumOfValues = 0; double avg; Scanner input = new Scanner(System.in); /* Get a set of numbers from user */ System.out.println("Calculate Average Program"); System.out.print("Enter a value (" + SENTINEL + " to quit): "); newValue =...
I entered in this code for my programming fundamentals class for this question To encourage good...
I entered in this code for my programming fundamentals class for this question To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’s grade point average. In other words, a student with a 3.2 grade point average receives a $32.0 credit. Create an application that prompts a student for a name and grade point average, and then passes the values to a method (computeDiscount) that displays a descriptive...
Covert the following Java program to a Python program: import java.util.Scanner; /* Calculates and displays the...
Covert the following Java program to a Python program: import java.util.Scanner; /* Calculates and displays the area of a rectangle * based on the width and length entered by the user. */ public class RectangleArea2 {             public static void main(String[] args) { int length; //longer side of rectangle             int width; //shorter side of rectangle int area; //calculated area of rectangle Scanner input = new Scanner(System.in);                               System.out.print("Enter the length: ");            length = input.nextInt(); System.out.print("Enter...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // Read the input string String input = sc.nextLine(); BalancedParentheses bp = new BalancedParentheses(); // Print whether the string has balanced parentheses System.out.println(bp.hasBalancedParentheses(input)); } } class BalancedParentheses { public boolean hasBalancedParentheses(String input) { // Remove this and implement code throw new UnsupportedOperationException(); } }
/* Program Name: BadDate.java Function: This program determines if a date entered by the user is...
/* Program Name: BadDate.java Function: This program determines if a date entered by the user is valid. Input: Interactive Output: Valid date is printed or user is alerted that an invalid date was entered. */ import java.util.Scanner; public class BadDate { public static void main(String args[]) { // Declare variables Scanner userInput = new Scanner (System.in); String yearString; String monthString; String dayString; int year; int month; int day; boolean validDate = true; final int MIN_YEAR = 0, MIN_MONTH = 1,...
4.2.2 Basic while loop with user input. JAVA Write an expression that executes the loop while...
4.2.2 Basic while loop with user input. JAVA Write an expression that executes the loop while the user enters a number greater than or equal to 0. Note: These activities may test code with different test values. This activity will perform three tests, with user input of 9, 5, 2, -1, then with user input of 0, -17, then with user input of 0 1 0 -1. See "How to Use zyBooks". Also note: If the submitted code has an...
Finish the CustomerAccountTransactions program that reads customer accounts receivable data from a file and then applies...
Finish the CustomerAccountTransactions program that reads customer accounts receivable data from a file and then applies a series of transactions to the accounts. Its main() method uses the CustomerAccounts class to manage a collection of CustomerAccount objects: reading customer accounts data & transactions, and obtaining a String showing the customer accounts data after the operations are complete. You will need to complete the readCustomerAccounts () and applyTransactions() methods in the CustomerAccounts class. First, please fill in your name in the...
import java.util.Scanner; public class AroundTheClock {    public static void main(String[] args)    {       ...
import java.util.Scanner; public class AroundTheClock {    public static void main(String[] args)    {        Scanner input = new Scanner(System.in);        int departureTime = input.nextInt();        int travelTime = input.nextInt();        int arrivalTime;            departureTime =12;            departureTime = 0;            arrivalTime = (int) (departureTime + travelTime);            (arrivalTime = (arrivalTime >=12));            if (arrivalTime = arrivalTime %12)            {            System.out.println(arrivalTime);...