ConsoleUi | A library for menu-based console applications | Menu library
kandi X-RAY | ConsoleUi Summary
kandi X-RAY | ConsoleUi Summary
A library for menu-based console applications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ConsoleUi
ConsoleUi Key Features
ConsoleUi Examples and Code Snippets
Community Discussions
Trending Discussions on ConsoleUi
QUESTION
I am working on a "homework assignment" for a tutorial I was doing on instantiated classes. I am trying to figure out how to print to the console at the end the users first and last name, along with the address they entered. I have one public class that has the properties for first name and last name, and another public class with the properties for street address, city, state, zip code, then a third class to "handle" the output of the data to the console. What I would like to accomplish is enter in user data and when I'm done have it print to console like the following:
Name: Fred Durst Address: 1234 Fake Street N. Fake City, FS 69696
Name: Bill Muri Address: 4321 Fake Street S. Fake City, FS 69696
I only know how to get it to print all the names, then all the addresses. I did some searching on here but don't know enough to really understand the answers I'm reading and if they're applicable or not to my scenario.
Main Program:
...ANSWER
Answered 2021-Apr-14 at 20:33You need a way to relate an address to a person. Right now you have no way of knowing a person's address once each loop iteration ends.
If there is one address per person then add a property to PersonModel
of type AddressModel
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ConsoleUi
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page