0% found this document useful (0 votes)
36 views

Gold

This document contains code for a Driver class that prints a welcome message to a golf manager application and instantiates a DGolf object. It also includes a Provider class with a main method that uses a Scanner to prompt the user to input a manager's name, stores the input as a String, and prints out messages welcoming the manager by name in both regular and uppercase letters.

Uploaded by

tom smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Gold

This document contains code for a Driver class that prints a welcome message to a golf manager application and instantiates a DGolf object. It also includes a Provider class with a main method that uses a Scanner to prompt the user to input a manager's name, stores the input as a String, and prints out messages welcoming the manager by name in both regular and uppercase letters.

Uploaded by

tom smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Driver Class

public class DGolf {


void GolfManager(){
System.out.println("Welcome to Golf Manager");//prints message line
}

DGolf link = new DGolf();

Provider Class
import java.util.Scanner;////import scanner to allow for user input
public class PGolf {
public static void main(String[] args) {
//begins the main method
Scanner input = new Scanner (System.in);
System.out.println("What is the manager's name?");//prints line and asks
the user to input
String Name = input.nextLine();//this would get the next string of text
when the user types
input

System.out.println("The manager's name is " + Name);//prints out the


{

System.out.println("Welcome to DGS Golf Club, " +


Name.toUpperCase());//the input is printed out in capital letters
}
}
}

You might also like