Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7605309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:08:11+00:00 2026-05-31T00:08:11+00:00

I posted a question earlier for a homework assignment but I have a new

  • 0

I posted a question earlier for a homework assignment but I have a new question. I am new at this so I appreciate any help I can get and I’m not looking for code but more of an explanation of the steps I need to take to get to my answer.

I’m working on an address book. The user picks a menu 1, 2, or 3. I have a main class, a validation class, a class that declares set and get and a class that handles the IO functions.

I’m just learning classes so please be patient but basically I want to understand how to save the info if the user wants to enter a new person.
I have a setName and getName and a setPhoneNumber and getPhoneNumber in a class I also have the function to save everything written in the IO class that was provided. I don’t understand what saves the information I guess is what I’m saying. Do I need to create a scanner for each line? or How do I send it to the right place?
Do I need to call the whole function that is in the IO class that handles the name and phone number?

   if(menuNumber == 2)
{
   System.out.println("Enter name: ")

   System.out.println("enter phone number: ")
}

Thank you in advance for any help. I’m taking classes online and so far java hasn’t been an easy one. I want to understand it but I’m struggling through this book and my projects have a pretty quick turnaround so I want to learn it but I almost need to stop and ask for someone to break it down for me in english instead of staring at a diagram in a book.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:08:13+00:00Added an answer on May 31, 2026 at 12:08 am

    Here is a list of steps:
    1) prompt user for value
    2) get value, store in local variable
    3) create new instance of class that holds data
    4) pass locals to setters

    If you read this from a file put these steps in a loop. Keep reusing the local variables. If one of your constructors takes a variable you can call that as soon as you get the first piece of data. For example (pseudo code);

    out- enter name
    in- name
    localString name_ = name
    MyClass newPerson = newPerson(name_)
    out- enter phone number
    in- 503-495-4950
    localPhoneNumber phoneNum = 503-495-4950
    newPerson.setPhoneNumber(phoneNum)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have posted a question earlier but unfortunately I did not get any useful
I posted a question about this earlier, but I have more information now and
I've posted this question in gis.stackexchange earlier but I'm not sure if that was
[I have posted this question earlier in the PowerShell Technet forum, but without a
I posted this question on Reddit Programming and did not get a single response.
It might be for pedantic purposes but not homework. I have below question about
I posted about this sort of earlier, but I am not sure how to
I posted a similar question earlier, but I now realize I should have been
(This is technically an addendum to an earlier StackOverflow question I had posted, but
I posted a question earlier about why django redirect was not working correctly, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.