Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Scanner
- {
- // instance variables - replace the example below with your own
- /**
- * Constructor for objects of class Scanner
- */
- public void displayMessage(String message)
- {
- // initialise instance variables
- System.out.print(message);
- }
- /**
- * An example of a method - replace this comment with your own
- *
- * @param y a sample parameter for a method
- * @return the sum of x and y
- */
- public void displayMessageLine(String message)
- {
- // put your code here
- System.out.println(message);
- }
- public void displayDollarAmount(double amount){
- System.out.printf("$%,.2f",amount);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment