Hey! So, I'm in serious need of help. It should be simple, but I'm over thinking this and need help. It's a program due tonight. I need to create a Dog class that represents a dog. Then, there are 2 different methods that in the end will each represent one dog each. Each printout will show the Name, Breed, Age, and Age in Human Years. Right now I'm having trouble trying to move methods in between each class. Here's the first class.
And this is the second class codeimport java.util.Scanner; public class Dog { //no main method static Scanner input = new Scanner(System.in); //writeObject method public static void writeObject(String name, String breed, int age) { System.out.println("Enter the dog's name, breed, and age: "); name = input.toString(); breed = input.toString(); age = input.nextInt(); } //getAgeInHumanYears method public static void getAgeInHumanYears(String name, String breed, int age) { System.out.println("Enter the dog's name, breed, and age: "); name = input.toString(); breed = input.toString(); age = input.nextInt(); } }
public class Dog_Demo { public static void main(String[] args) { String name; String breed; int age; int humanAge; } //writeObject method public static String writeObject() { String name, breed; int age; System.out.println("Name: ", Dog.writeObject(name, breed, age)); return null; } //getAgeInHumanYears method public static String getAgeInHumanYears() { System.out.println(); return null; } }