Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Open your IDE and create a new Project (or use an existing Project). Create a new class called Contactinfo in that Project. 2. Create
1. Open your IDE and create a new Project (or use an existing Project). Create a new class called Contactinfo in that Project. 2. Create the following field variables for the Contactinfo class: Note: Data type and name will be part of the points here. Hint: One of them can/should be an integer. A. A variable that stores the contact's full name. B. A variable that stores the contact's phone number (as a String). Note: Being a String allows for formatted phone number inputs. C. A variable that stores the contact's email address. D. A variable that stores the contact's address information (street address). E. A variable that stores the contact's address information city. F. A variable that stores the contact's address information state. G. A variable that stores the contact's address information zip code. 3. Inside the constructor, assign your field variable names to the corresponding variable in the constructor's code. 4. Inside the toString method, assign your field variable names to the corresponding variable in the toString's code. 5. Inside the main method, create a new Scanner object called input. Scanner input = new Scanner(System.in); 6. Inside the main method, get all of the relevant Contact Information. Make sure to prompt the user for what they are entering. /Prompt the user to enter information System.out.println("Enter a number:"); //Read and store that information. int num=input.nextInt(); 7. Create the Contactinfo object. 8. Output the Contactinfo you created/updated in step 7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started