So in my class we're making simple programs and we're introducing inheritance. I've gotten everything to work properly, but I can't get this one bit of output to work correctly. It's when I'm asking for an input, but it skips one of my inputs and goes to the request for the second one. When I comment all the other things before that aren't needed, it doesn't skip the first input. I don't understand why this is, and if someone could help me decipher why it would be much appreciated. Thanks in advance and here are my two classes followed by the tester:
Person class:
public class Person{
private String name, address, phoneNumber;
public Person(){
name="none";
address="none";
phoneNumber="none";
}
public Person(String inName, String inAddress, String inPhoneNumber){
name=inName;
address=inAddress;
phoneNumber=inPhoneNumber;
}
public String getName(){
return name;
}
public void setName(String newName){
name = newName;
}
public String getAddress(){
return address;
}
public void setAddress(String newAddress){
address = newAddress;
}
public String getPhoneNumber(){
return phoneNumber;
}
public void setPhoneNumber(String newPhoneNumber){
phoneNumber = newPhoneNumber;
}
public String toString(){
return String.format("Name: " + name + "\nAddress: " + address + "\nPhone Number: " + phoneNumber);
}
public void clearPerson(){
name="none";
address="none";
phoneNumber="none";
}
}
Customer class:
public class Customer extends Person{
private int customerNumber;
private boolean mailingList;
public Customer(){
customerNumber=0;
mailingList=false;
}
public Customer(int inCustomerNumber, boolean inMailingList){
customerNumber=inCustomerNumber;
mailingList=inMailingList;
}
public int getCustomerNumber(){
return customerNumber;
}
public void setCustomerNumber(int newCustomerNumber){
customerNumber=newCustomerNumber;
}
public boolean getMailingList(){
return mailingList;
}
public void setMailingList(boolean newMailingList){
mailingList=newMailingList;
}
public String toString(){
return "Customer Number: "+customerNumber+"\nMailing List: "+mailingList+"\n";
}
public void clearCustomer(){
customerNumber=0;
mailingList=false;
}
}
Tester class:
import java.util.*;
public class CustomerPersonTester{
public static void main(String[] args){
Scanner in = new Scanner(System.in);
Person testP1 = new Person();
Customer testC1 = new Customer();
System.out.println("Empty paramaters constructed on Person and Customer. Results: ");
System.out.println(testP1.toString());
System.out.println(testC1.toString());
/*System.out.println(testP1.getName());
System.out.println(testP1.getAddress());
System.out.println(testP1.getPhoneNumber());
System.out.println(testC1.getCustomerNumber());
System.out.println(testC1.getMailingList());*/
System.out.println("Expected: none x3, 0, false.\n");
System.out.print("Enter a new name: ");
String newName = in.nextLine();
System.out.print("Enter a new address: ");
String newAddress = in.nextLine();
System.out.print("Enter a new phone number: ");
String newPhoneNumber = in.nextLine();
System.out.print("Enter a new customer number: ");
int newCustomerNumber = in.nextInt();
System.out.print("Enter a new true/false for mailing list: ");
boolean newMailingList = in.nextBoolean();
testP1.setName(newName);
testP1.setAddress(newAddress);
testP1.setPhoneNumber(newPhoneNumber);
testC1.setCustomerNumber(newCustomerNumber);
testC1.setMailingList(newMailingList);
System.out.println(testP1.toString());
System.out.println(testC1.toString());
/*System.out.println(testP1.getName());
System.out.println(testP1.getAddress());
System.out.println(testP1.getPhoneNumber());
System.out.println(testC1.getCustomerNumber());
System.out.println(testC1.getMailingList());*/
System.out.println("Expected: given name/address/phone number/customer number/boolean.\n");
testP1.clearPerson();
testC1.clearCustomer();
System.out.println("\nTest 1 Complete. Values are reset. Please continue.\n");
System.out.print("Enter a name: ");
String inName = in.nextLine();
System.out.print("Enter an address: ");
String inAddress = in.nextLine();
System.out.print("Enter a phone number: ");
String inPhoneNumber = in.nextLine();
System.out.print("Enter a customer number: ");
int inCustomerNumber = in.nextInt();
System.out.print("Enter true/false for mailing list: ");
boolean inMailingList = in.nextBoolean();
Person testP2 = new Person(inName, inAddress, inPhoneNumber);
Customer testC2 = new Customer(inCustomerNumber, inMailingList);
System.out.println(testP2.toString());
System.out.println(testC2.toString());
/*System.out.println(testP2.getName());
System.out.println(testP2.getAddress());
System.out.println(testP2.getPhoneNumber());
System.out.println(testC2.getCustomerNumber());
System.out.println(testC2.getMailingList());*/
System.out.println("Expected: given name/address/phone number/customer number/boolean.\n");
System.out.println("Program complete. Terminating...");
in.close();
}
}
My output keeps looking like this:
Empty paramaters constructed on Person and Customer. Results:
Name: none
Address: none
Phone Number: none
Customer Number: 0
Mailing List: false
Expected: none x3, 0, false.
Enter a new name: Bob
Enter a new address: 123 Happy Lane
Enter a new phone number: 123-456-7890
Enter a new customer number: 12
Enter a new true/false for mailing list: true
Name: Bob
Address: 123 Happy Lane
Phone Number: 123-456-7890
Customer Number: 12
Mailing List: true
Expected: given name/address/phone number/customer number/boolean.
Test 1 Complete. Values are reset. Please continue.
Enter a name: Enter an address: Problem starts here...
The call to nextBoolean() doesn't consume the newline character that follows either your true or false input. As a result, this newline character is still in the input buffer when you next call nextLine(), which immedately consumes the leftover newline character and then moves on.
To get the expected behaviour, simply add another call to nextLine() just after you call nextBoolean(). You should also note that this would have happened if nextInt() was the last call in the sequence too.
You might also want to think about putting parts of that code into some form of loop (a while loop perhaps?) so that you've not got a huge section of duplicated code.
Related
Basically, I just tried to learn linked lists but I can't seem to understand how to insert a bunch of data from different variables into it. Does it work as an array/ ArrayList? Before we end the loop we are supposed to store the data right, but how??
Let say I have variables ( name, age, phonenum).
'''
char stop='Y';
while(stop!='N'){
System.out.println("\nEnter your name : ");
int name= input.nextLine();
System.out.println("\nEnter your age: ");
int age= input.nextInt();
System.out.println("\nEnter your phone number: ");
int phonenum= input.nextLine();
System.out.println("Enter 'Y' to continue, 'N' to Stop: ");
stop = sc.nextLine().charAt(0);
}
'''
First, change your code to use appropriate types. Name and phone should be of type String, not int.
Define a class to hold your fields. Records are an easy way to do that.
record Person ( String name , int age , String phone ) {}
Declare your list to hold objects of that class.
List< Person > list = new LinkedList<>() ;
Instantiate some Person objects, and add to list.
list.add( New Person( "Alice" , 29 , "477.555.1234" ) ) ;
In the line above, I hard-coded some example data. In your own code, you will be passing to the constructor the variables you populated by interacting with the user.
list.add( New Person( name , age , phonenum ) ) ;
You can create an object which has name, age and phenomenon then create an insert method which you call in your while loop.
In psuedo code it would look something like this:
public class Data {
String name;
int age;
int phenomenon;
//constructor
//getters & setters
}
This class above will hold contain the user input. You can gather all the user input and store it in an array and perform the insert with array of data instead of inserting one object at a time
public void InsertData(LinkedList<Data> list, Arraylist<Data> input) {
for(Data d: input){
list.add(d);
}
}
You can read up on linkedlists a bit more here to understand how exactly linkedlists work and implement your own from scratch: https://www.geeksforgeeks.org/implementing-a-linked-list-in-java-using-class/
Try this
Possibility : 1
import java.util.*;
public class Naddy {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
char stop = 'Y';
LinkedList<Object> list = new LinkedList<Object>();
while (stop != 'N') {
System.out.println("\nEnter your name : ");
String name = input.nextLine();
System.out.println("\nEnter your age: ");
int age = input.nextInt();
System.out.println("\nEnter your phone number: ");
long phonenum = input.nextLong();
list.add(name);
list.add(age);
list.add(phonenum);
System.out.println("Enter 'Y' to continue, 'N' to Stop: ");
input.nextLine();
stop = input.nextLine().charAt(0);
}
System.out.println(list);
}
}
possibility : 2
import java.util.*;
public class Naddy {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
char stop = 'Y';
LinkedList<User> list = new LinkedList<User>();
while (stop != 'N') {
System.out.println("\nEnter your name : ");
String name = input.nextLine();
System.out.println("\nEnter your age: ");
int age = input.nextInt();
System.out.println("\nEnter your phone number: ");
long phonenum = input.nextLong();
list.add(new User(name, age, phonenum));
System.out.println("Enter 'Y' to continue, 'N' to Stop: ");
input.nextLine();
stop = input.nextLine().charAt(0);
}
System.out.println(list);
}
}
class User {
private String name;
private int age;
private long phonenum;
public User() {
}
public User(String name, int age, long phonenum) {
this.name = name;
this.age = age;
this.phonenum = phonenum;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public long getPhonenum() {
return phonenum;
}
public void setPhonenum(long phonenum) {
this.phonenum = phonenum;
}
#Override
public String toString() {
return "User [age=" + age + ", name=" + name + ", phonenum=" + phonenum + "]";
}
}
This question already has answers here:
Scanner is skipping nextLine() after using next() or nextFoo()?
(24 answers)
Closed 1 year ago.
I have created two files one with having private variables and getters and setters, and other with taking input from the user and displaying the output in the console.
When I execute the program, it runs without error but when the input is given, it takes 3 inputs out of 4.
I am unable to get input for the fourth variable.
File with getters and setters👇
package tryProject;
public class Employee {
private String name;
private int yearJoin;
private int salary;
private String address;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getYearJoin() {
return yearJoin;
}
public void setYearJoin(int yearJoin) {
this.yearJoin = yearJoin;
}
public int getSalary() {
return salary;
}
public void setSalary(int salary) {
this.salary = salary;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
File to take input and give output
package tryProject;
import java.util.Scanner;
public class EmployeeInfo {
public static void main(String[] args) {
Employee e = new Employee();
Scanner s = new Scanner(System.in);
System.out.println("Enter details: ");
System.out.println("Name: ");
String input_name = s.nextLine();
e.setName(input_name);
System.out.println(e.getName());
System.out.println("Salary: ");
int input_salary = s.nextInt();
e.setSalary(input_salary);
System.out.println(e.getSalary());
System.out.println("Year of Join: ");
int input_YearJoin = s.nextInt();
e.setYearJoin(input_YearJoin);
System.out.println(e.getYearJoin());
System.out.println("Address: ");
String input_Address = s.nextLine();
e.setAddress(input_Address);
System.out.println(e.getAddress());
}
}
I've tested your program and indeed it prints name, salary and year while it prints an empty line for address. The reason for that is when you give input for "year of join", you type some number and then press "Enter". When you press "Enter" you actually give an input of empty line ("\n") and that's still an input and it's taken for address field. That's why the program doesn't wait for your address line. If you use a debugger you'll notice that. If you change String input_Address = s.nextLine(); to String input_Address = s.next(); and then run your program you'll understand what I mean. However, I don't suggest this as a fix.
I suggest that you add scanner.nextLine(); after reading year of join. This way the program will read the next empty line which was generated by pressing "Enter" key. And then it will read your actual address data.
System.out.println("Year of Join: ");
int input_YearJoin = scanner.nextInt();
e.setYearJoin(input_YearJoin);
System.out.println(e.getYearJoin());
scanner.nextLine();
You can read this post for more insight: Scanner is skipping nextLine() after using next() or nextFoo()?
Try .next() instead of .nextLine().
I would change it for the name too.
I changed your code so it works:
public static void main(String[] args) {
Employee e = new Employee();
Scanner s = new Scanner(System.in);
System.out.println("Enter details: ");
System.out.println("Name: ");
String input_name = s.next(); //changed .nextLine() to .next()
e.setName(input_name);
System.out.println(e.getName());
System.out.println("Salary: ");
int input_salary = s.nextInt();
e.setSalary(input_salary);
System.out.println(e.getSalary());
System.out.println("Year of Join: ");
int input_YearJoin = s.nextInt();
e.setYearJoin(input_YearJoin);
System.out.println(e.getYearJoin());
System.out.println("Address: ");
String input_Address = s.next(); //changed .nextLine() to .next()
e.setAddress(input_Address);
}
This question already has answers here:
How to compare two java objects [duplicate]
(5 answers)
Closed 6 years ago.
For some reason, in my Pseudo database, my remove method seems to be completely ineffective and isn't working. The source code is below:
import java.util.ArrayList;
import java.util.Scanner;
public class Lab2 {
static ArrayList<Person> peopleDirectory = new ArrayList<Person>(10);
public static void main(String[] args) {
// TODO Auto-generated method stub
int choice;
Scanner userInput = new Scanner(System.in);
do {
System.out.println("Welcome to the people directory please make a choice from the list below:");
System.out.println("-------------------------------------------------------------------------");
System.out.println("1. Add a person to the directory.");
System.out.println("2. Remove a Person from the directory.");
System.out.println("3. View the User Directory.");
System.out.println("4. Exit the directory.");
choice = userInput.nextInt();
switch(choice) {
case 1:
addPerson(new Person());
break;
case 2: removePerson(new Person());
break;
case 3: displayPeople();
break;
case 4: System.out.println("Thanks for using the people diretory!");
System.exit(0);
break;
default: System.out.println("Invalid choice! Please select a valid choice!");
break;
}
} while (choice != 4);
}
public static void addPerson(Person thePerson) {
String firstName;
String lastName;
String phoneNumber;
int age;
if (peopleDirectory.size() >= 10) {
System.out.println("Sorry the list can not be larger than 10 people");
} else {
int i = 0;
Scanner input = new Scanner(System.in);
System.out.println("Enter the first name of the Person you would like to add: ");
firstName = input.nextLine();
thePerson.setFirstName(firstName);
System.out.println("Enter the last name of the Person you would like to add: ");
lastName = input.nextLine();
thePerson.setLastName(lastName);
System.out.println("Enter the phone number of the Person you would like to add: ");
phoneNumber = input.nextLine();
thePerson.setPhoneNumber(phoneNumber);
System.out.println("Enter the age of the Person you would like to add: ");
age = input.nextInt();
thePerson.setAge(age);
peopleDirectory.add(i, thePerson);
i++;
}
}
public static void removePerson(Person thePerson) {
if (peopleDirectory.size() < 1) {
System.out.println("There is absolutely nothing to remove from the Directory");
}
else {
Scanner input = new Scanner(System.in);
System.out.println("Please enter the first name of the person you would like to delete: ");
String firstName = input.nextLine();
thePerson.setFirstName(firstName);
System.out.println("Enter the last name of the Person you would like to remove: ");
String lastName = input.nextLine();
thePerson.setLastName(lastName);
System.out.println("Enter the phone number of the Person you would like to remove: ");
String phoneNumber = input.nextLine();
thePerson.setPhoneNumber(phoneNumber);
System.out.println("Enter the age of the Person you would like to remove: ");
int age = input.nextInt();
thePerson.setAge(age);
for (int i = 0; i < peopleDirectory.size(); i++) {
if (peopleDirectory.get(i).equals(thePerson)) {
peopleDirectory.remove(thePerson);
}
}
}
}
public static void displayPeople() {
for (Person person : peopleDirectory) {
System.out.println("First Name: " + person.getFirstName() + " Last name: " +
person.getLastName() + " Phone number: " + person.getPhoneNumber() +
" Age: " + person.getAge());
}
}
}
class Person {
private String firstName;
private String lastName;
private int age;
private String phoneNumber;
public Person (String firstName, String lastName, int personAge, String phoneNumber) {
this.firstName = firstName;
this.lastName = lastName;
this.age = personAge;
this.phoneNumber = phoneNumber;
}
public Person() {
this.firstName = "";
this.lastName = "";
this.age = 0;
this.phoneNumber = "";
}
public int getAge() {
return this.age;
}
public String getFirstName() {
return this.firstName;
}
public String getLastName() {
return this.lastName;
}
public String getPhoneNumber() {
return this.phoneNumber;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public void setAge(int age) {
this.age = age;
}
public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}
}
When I attempt to remove an element from the ArrayList, it still remains in the arrayList. I have no idea why, but I feel as if my remove method is a bit clunky.
For instance I add an element and attempt to remove it (see output below):
Welcome to the people directory please make a choice from the list below:
-------------------------------------------------------------------------
1. Add a person to the directory.
2. Remove a Person from the directory.
3. View the User Directory.
4. Exit the directory.
1
Enter the first name of the Person you would like to add:
Tom
Enter the last name of the Person you would like to add:
Jones
Enter the phone number of the Person you would like to add:
6073388152
Enter the age of the Person you would like to add:
24
Welcome to the people directory please make a choice from the list below:
-------------------------------------------------------------------------
1. Add a person to the directory.
2. Remove a Person from the directory.
3. View the User Directory.
4. Exit the directory.
3
First Name: Tom Last name: Jones Phone number: 6073388152 Age: 24
Welcome to the people directory please make a choice from the list below:
-------------------------------------------------------------------------
1. Add a person to the directory.
2. Remove a Person from the directory.
3. View the User Directory.
4. Exit the directory.
2
Please enter the first name of the person you would like to delete:
Tom
Enter the last name of the Person you would like to remove:
Jones
Enter the phone number of the Person you would like to remove:
6073388152
Enter the age of the Person you would like to remove:
24
Welcome to the people directory please make a choice from the list below:
-------------------------------------------------------------------------
1. Add a person to the directory.
2. Remove a Person from the directory.
3. View the User Directory.
4. Exit the directory.
3
First Name: Tom Last name: Jones Phone number: 6073388152 Age: 24
Welcome to the people directory please make a choice from the list below:
-------------------------------------------------------------------------
1. Add a person to the directory.
2. Remove a Person from the directory.
3. View the User Directory.
4. Exit the directory.
What could I be doing wrong here?
if you want to compare objects should have something like this, complete answer here here !
public boolean equals(Object object2) {
return object2 instanceof MyClass && a.equals(((MyClass)object2).a);
}
or could compare for any specific field of its objects for example
if(peopleDirectory.get(i).getFirstName().equals(thePerson.getFirstName()))
*no need to send a parameter a new Person () could work with a single object class level and only modify their attributes with its setter when you want to perform some operation
nor declare as many Scanner objects if you can work with one for example *
static Scanner userInput = new Scanner(System.in);
to work with a single object could be something
static Person person = new Person();//declaration
and its method add or remove when requesting data entry setteas object attributes created and comparison also perform based on that object
System.out.println("Enter the first name of the Person you would like to add: ");
person.setFirstName(userInput.nextLine());//data entry and setteo
if (peopleDirectory.get(i).equals(person)) // comparation
I'm doing an assignment for class which requires me to create an array and add to it as the user wishes. Here's what I have so far:
public void add(Scanner stdIn)
{
entries = new String[1];
Contact add = new Contact(); // Instantiate new Contact instance
String name;
System.out.print("Enter the contact's name: ");
name = stdIn.next();
add.setName(name); // set name in Contact class
String address;
System.out.print("Enter the contact's address: ");
address = stdIn.next();
add.setAddress(address); // set address in Contact class
String phone;
System.out.print("Enter the contact's phone number: ");
phone = stdIn.next();
add.setPhone(phone); // set phone number in Contact class
String email;
System.out.print("Enter the contact's email address: ");
email = stdIn.next();
add.setEmail(email); // set email address in Contact class
final int N = entries.length;
entries = Arrays.copyOf(entries, N + 1);
entries[0] = add.toString();
System.out.print(Arrays.toString(entries));
} // end add
I am not too familiar with using arrays, so trying to copy the old array and create a new array with the old information, as well as add new information is alluding me. The toString method looks like this:
#Override // Overrides method from java.lang.Object
public String toString() // Displays the info for a contact in order
{
return getName() + "\t" + getAddress() + "\t" + getPhone() +
"\t" + getEmail();
}
If you need any more clarification, let me know! Thanks for the help!
As I mentioned in your comment, you need to define the array (could use an ArrayList instead) outside of the method or it will go out of scope and the data will be lost between calls to the add method.
Here is sample code showing how to make multiple calls to add(), each time expanding the array by 1 and printing the result:
import java.util.Arrays;
import java.util.Scanner;
public class ArrayCopy {
String[] entries = new String[0];
public void add(Scanner stdIn)
{
entries = Arrays.copyOf(entries, entries.length + 1);
Contact add = new Contact(); // Instantiate new Contact instance
String name;
System.out.print("Enter the contact's name: ");
name = stdIn.next();
add.setName(name); // set name in Contact class
String address;
System.out.print("Enter the contact's address: ");
address = stdIn.next();
add.setAddress(address); // set address in Contact class
String phone;
System.out.print("Enter the contact's phone number: ");
phone = stdIn.next();
add.setPhone(phone); // set phone number in Contact class
String email;
System.out.print("Enter the contact's email address: ");
email = stdIn.next();
add.setEmail(email); // set email address in Contact class
entries[entries.length-1] = add.toString();
System.out.println(Arrays.toString(entries));
} // end add
public static void main(String[] args) {
ArrayCopy program = new ArrayCopy();
Scanner scan = new Scanner(System.in);
String op = "";
System.out.println("Press A to add a user or E to exit.");
while(!(op = scan.nextLine()).equalsIgnoreCase("E")){
switch(op){
case "A":
program.add(scan);
break;
case "E":
System.out.println("Good Bye.");
System.exit(0);
}
}
}
}
I am new to methods such as the public void stuff on Java.
If someone enters First Name as: John and surname: Smith. My program should display the UserID as jsmith. That all works fine when I put it all in the main method. I want it all on the same class (UserID) I also get an error message saying Insert assignment operator expression where it says:
process.userID;
Here's the code:
import java.util.Scanner;
public class UserID {
Scanner myScan = new Scanner (System.in);
char firstLetter;
String firstName;
String minCharacters;
String surname;
String userID;
public void firstName () {
System.out.print("Please enter your firstname: ");
firstName = myScan.nextLine();
}
public void surname () {
System.out.print("Please enter your surname: ");
surname = myScan.nextLine();
}
public void userID (String userID) {
firstLetter = firstName.charAt(0);
minCharacters=surname.substring(0, 5);
userID = firstLetter+minCharacters;
System.out.print("User ID = " + userID.toLowerCase());
System.out.println ("\nPlease keep a note of your User ID");
myScan.close();
}
public static void main(String[] args) {
String userID;
userID process = new UserID();
process.userID;
}
}
Adding on top of Daniel Stanley's answer, you are not calling firstname() and surname() methods in your main method or inside userId() method which takes input from Command Line.
This line:
userID process = new UserID();
should be:
UserID process = new UserID(); //capital 'U'
and then:
process.userID("SomeString"); //add brackets
public void userID () {
firstLetter = firstName.charAt(0);
minCharacters=surname.length()>=5?surname.substring(0, 5):surname;
userID = firstLetter+minCharacters;
System.out.print("User ID = " + userID.toLowerCase());
System.out.println ("\nPlease keep a note of your User ID");
myScan.close();
}
public static void main(String[] args) {
UserID process = new UserID();
process.firstName();
process.surname();
process.userID();
}
Updated your code. It works. First issue was with UserID as Daniel pointed. Later, the surname can be less than 5 digit so it takes care of that. since you are using firstname and surname then you do not need to pass userId in the method.
Try this, Code have some logical and Java naming convention errors;
I have edited you code respectively.
public class UserID {
Scanner myScan = new Scanner(System.in);
char firstLetter;
String firstName;
String minCharacters;
String surName;
String userID;
public void setFirstName() {
System.out.print("Please enter your firstname: ");
this.firstName = myScan.nextLine();
}
public void setSurName() {
System.out.print("Please enter your surname: ");
this.surName = myScan.nextLine();
}
public void generateUserID() {
firstLetter = firstName.charAt(0);
minCharacters = surName;
userID = firstLetter + minCharacters;
System.out.print("User ID = " + userID.toLowerCase());
System.out.println("\nPlease keep a note of your User ID");
myScan.close();
}
public static void main(String[] args) {
String userID;
UserID process = new UserID();
process.setFirstName();
process.setSurName();
process.generateUserID();
}
}
Feel free to ask anything.