Hello Norm,
I have decided to start fresh as I was getting to jumbled on this..... I will include what I have so far as I don't know where to go from here. On my Business class that extends the InfoClass, there should be a return of fName but I cant get anything to return anything.... I will need to add it to an ArrayList of some kind until the user is all done... I will also have to recall all data either (either kind of contact).. Any direction will greatly be appreciated.
Code:
package contacts2;
//import java.util.ArrayList;
import java.util.Scanner;
import java.util.ArrayList;
/**
*
* @author Drew
*/
public class Contacts2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
//Instantiates the Scanner Class
Scanner in = new Scanner(System.in);
//Asks user which kinda of contact 1)Business or 2) Personal
System.out.println("Please enter B for a business contact or P for a personal contact: ");
String cont = in.next();
if(cont.equals("B"))
{
Business fno = new Business();
Business lno = new Business();
Business ado = new Business();
Business pno = new Business();
Business emo = new Business();
Business poso = new Business();
Business orgo = new Business();
fno.firstName();
}
// else
//{
// System.out.print("You chose else: ");
//}
}
}
Code:
package contacts2;
import java.util.Scanner;
import java.util.ArrayList;
/**
*
* @author Drew
*/
public class Business extends ContactInfo
{
Scanner in = new Scanner(System.in);
ArrayList<Business> busContact = new ArrayList<Business>();
public String firstName()
{
System.out.println("What is your Fisrt Name: ");
String fName = in.next();
//return fName;
//System.out.println("This is some txt!!" + fName);
return fName;
}
}