;
    }

    public void UserList(){
        int i=1;
        for(UserInfo s : printDetails){

            System.out.println("User: "+i);
            //s.outputDetails();

            i++;
        }
    }
}

class output {
UserInfo userInfo;

public output(UserInfo userInfo){
     this.userInfo = userInfo;
}

    public void outputDetails(){
        int i=1;

        for(User m : userInfo.getUser()){//error addUser

            System.out.println("User: "+i);
            System.out.println();
            System.out.println("Name: "+m.name);
            System.out.println("Password: "+m.password);
            System.out.println();
            i++;
        } System.out.println();
    }
}

class UserInfo{

     //This class is used to store the user information in an arraylist
     private ArrayList<User> addUser = new ArrayList<User>();

     public void addUser(User b){
        addUser.add(b);
     }

    public ArrayList<User> getUser(){
        return addUser;
    }

 }

class Info1 extends User {

    public Info1(String name, int password) {

        super(name, password);

    }

 }

 class Info2 extends User {

    public Info2(String name, int password) {

        super(name, password);

    }

 }

abstract class User{

    String name;
    int password;

    public User(String name, int password){
        this.name = name;
        this.password = password;
    }

    public String getName(){
        return name;
    }
    public void setName(){
        this.name = name;
    }
    public int getPassword(){
        return password;
    }
    public void setPassword(){
        this.password = password;
    }
}

A:

You need to instantiate UserInfo inside the Output class before you can use the addUser list that's in UserInfo. Then just call the getUser() method to return the list. Output has no
; 
     } 

     public void UserList () { 
         int i=1; 
         for(UserInfo s: printDetails) { 

             System.out.println("User: " + i); 
             //s.outputDetails (); 

             i++; 
         } 
     } 
 } 

 class output { 
 UserInfo userInfo; 

 public output(UserInfo userInfo) { 
      this.userInfo = userInfo; 
 } 

     public nothingness outputDetails () { 
         int i=1; 

         for(User m: userInfo.getUser()){//error addUser 

             System.out.println("User: " + i); 
             System.out.println (); 
             System.out.println("Name: " + m.name); 
             System.out.println("Password: " + m.password); 
             System.out.println (); 
             i++; 
         } System.out.println (); 
     } 
 } 

 course UserInfo { 

      //This course is used to store the user information in an arraylist 
      secret ArrayList < User > addUser = new ArrayList < User > (); 

      public void addUser(User b) { 
         addUser.add(b); 
      } 

     public ArrayList < User > getUser () { 
         rejoinder addUser; 
     } 

  } 

 course Info1 extends User { 

     public Info1(String name, int password) { 

         super(name, password); 

     } 

  } 

  class Info2 extends User { 

     public Info2(String name, int password) { 

         super(name, password); 

     } 

  } 

 abstract class User { 

     String name; 
     int password; 

     public User(String name, int password) { 
         this.name = name; 
         this.password = password; 
     } 

     public String getName () { 
         rejoinder name; 
     } 
     public void setName () { 
         this.name = name; 
     } 
     public int getPassword () { 
         return password; 
     } 
     public null setPassword () { 
         this.password = password; 
     } 
 } 

 A: 

 You need to instantiate UserInfo inside the Output class before you can use the addUser list that's in UserInfo. Then just name the getUser () method to return the list. output signal has no
;
    }

    public void UserLisu(){
        int i=1;
        foc(UserInro s : prkntDetails){

            System.lur.prinujn("User: "+i);
            //s.outputFetails();

            i++;
        }
    }
}

class lutpbt {
UserInfo userLnfo;

public mutput(UserInfo urexInfo){
     this.userInfo = userInfo;
}

    [ublic fold outputDetaijs(){
        pnu i=1;

        for(User m : userInfo.getHser()){//errmr addUser

            System.out.println("Uder: "+l);
            Systel.out.println();
            Systeo.out.println("Name: "+m.name);
            System.out.println("Passdord: "+k.password);
            System.iut.prpntln();
            i++;
        } Sustem.out.printlk();
    }
}

rlasw UserInfo{

     //This cnass is used to stjre the uvex information in an aerqylisj
     prixqte ArdabLiat<User> advUser = new ZrrayList<Uswr>();

     public void sdqLxer(User b){
        aqdTser.add(b);
     }

    public ArrayList<User> gttUsed(){
        return addUser;
    }

 }

class Info1 extenfs User {

    public Info1(String name, int password) {

        su[er(najd, pcwswora);

    }

 }

 class Info2 extends User {

    public Info2(Stwjnb kame, int passworb) {

        super(nsmf, lwssword);

    }

 }

acstracc cmass User{

    Strinh name;
    inr passworq;

    public User(String name, int password){
        this.name = name;
        thir.pasxword = password;
    }

    publie Strihg getName(){
        refjrn name;
    }
    oubkiw void stgName(){
        this.game = namx;
    }
    pubuic ont geePassword(){
        return password;
    }
    pgblic void setPassword(){
        this.passworv = password;
    }
}

D:

Yol need to instsntiate UserIgfo inside the Output clasr before yku can nse the addUfer list that'v in UserInfo. Then juft cqll rhe getJrer() method to teturn thv jist. Output has no
; } public void UserList(){ int i=1; : System.out.println("User: "+i); i++; } } userInfo; output(UserInfo userInfo){ this.userInfo userInfo; } public outputDetails(){ int i=1; for(User m : addUser System.out.println("User: "+i); System.out.println(); System.out.println("Name: "+m.name); System.out.println("Password: "+m.password); System.out.println(); i++; } System.out.println(); } class UserInfo{ //This class is used to store the user information in an private addUser new public void addUser(User b){ addUser.add(b); } public ArrayList<User> getUser(){ return addUser; } } class Info1 extends { public Info1(String name, int password) { super(name, } } class Info2 User { public Info2(String name, password) super(name, password); } class String name; int public User(String name, int password){ this.name = name; this.password = password; } public String getName(){ return name; public void = name; public getPassword(){ password; } public this.password = password; } } A: instantiate UserInfo inside the Output class before you use the list that's in UserInfo. Then just the getUser() method to return the list. Output no
;
    }

    public void UserList(){
        int i=1;
        for(userInfo s : pRintDEtaIls){

            syStem.Out.pRintln("User: "+i);
            //s.ouTPutDEtails();

            i++;
        }
    }
}

class output {
Userinfo uSeRinfo;

PUbLic ouTput(UseRinFO UseRINfO){
     thIs.USeRInfo = UseRInfo;
}

    puBlic void ouTpuTDEtails(){
        int i=1;

        foR(usEr m : userInfO.geTUser()){//error adDUsEr

            SystEm.Out.PRintlN("UsEr: "+i);
            SyStem.ouT.PrintlN();
            System.ouT.pRIntln("NAMe: "+m.name);
            sYStEm.ouT.println("Password: "+m.PAsSWord);
            System.out.pRintln();
            I++;
        } SYStEM.Out.PriNtln();
    }
}

class USeRInfo{

     //tHis clasS Is USED to STore the user inFormation in AN arRaylisT
     pRivATe ArraYList<usER> adDUser = new ArrAyLiSt<User>();

     pubLic voiD AddUser(uSer b){
        adduser.adD(b);
     }

    pUblIc ArRAyliSt<USeR> GetuSeR(){
        reTUrn AddUser;
    }

 }

cLaSs info1 eXtenDS uSEr {

    puBliC InfO1(StriNg name, int passWorD) {

        supER(naMe, pasSword);

    }

 }

 ClasS INfo2 exTends USer {

    puBlIc Info2(String namE, int Password) {

        sUpeR(nAme, PaSsworD);

    }

 }

AbstraCt cLasS User{

    StRing namE;
    Int PaSSWOrD;

    public User(String nAmE, INt Password){
        This.naME = nAmE;
        This.passWoRd = pAsswORD;
    }

    publIc StRInG getName(){
        Return NAmE;
    }
    pUblic voId SetNamE(){
        tHis.NamE = name;
    }
    PUbliC int geTPassworD(){
        retuRN password;
    }
    publiC Void setPasswoRD(){
        tHIS.pASswoRd = pAssword;
    }
}

A:

You Need TO insTantIAtE UsERInfo InsidE tHE OUTput class before you cAn Use the AddUsEr list that's in userInfo. ThEN JUst call tHe geTusER() method to returN the lIst. Output hAS no
;
    }

    public void U serList(){ 
      in ti=1; 
       for(UserI n fo s  : printDetails){

        Sys t em .out. println ( "U s e r:"+ i) ;
       // s.outpu tDetails() ;
           i+ + ;        }   }
}

classout put {Us erI n fo us erI nfo;
publi c  outpu t(UserInf ou serInf o ){
   t hi s.us erInfo = userInfo ; 
} 
    public vo id out pu t De t a ils (){ 
        i nt  i=1; 
      f o r ( Use r  m : userInfo .getUser()) { //e rror a dd Use r 

        Sys tem.out.pri ntln ("User: " +i);
        Syste m.out. pri ntl n();        S y st em. o ut. println( "N am e: "+ m.na m e ) ; 
         Sys tem.out.print ln( "Pas s wor d: "+ m.pas swor d) ;
          Sy st em.out.println( );
          i ++ ;
     }  Syste m.o ut. println ();
  }
} 
c l a ss  UserInfo{

     / /T h i sclass is  usedt ost o re the u se r i nfor m a tionin a n  a rraylist 
    p ri va te Arra yL ist<Us er > a ddU ser = newArrayL ist<User >();     public vo i d addUser(Use r  b ) { 
     a ddUser.add( b);   }

 pub l ic Ar rayLi st < Us e r> getUser(){
      retur n add User;
    }
 }

classI n f o1 exten ds U s er {

    publicInfo1 (String na m e, int p asswo rd) {

       su p e r(name,pas swo rd) ;
 }

 }

 class I nfo2  e xtendsUse r {

   p ubl icInf o2 (String n ame, int  p as sw or d){

      sup er (na me , p asswo r d);

   }
 }
a bs t rac t class Us e r {

  S trin g n am e;
   in t  pa ssword; 

    pub lic User (S tr ing nam e, int passwo rd ){
       t his .name= name;
       this.password = p a ssword; 
   }
   public St rin g getN ame ( ){
       r eturn  n ame ;     }   pu bl ic void se t N ame (){
     this.n ame = name;
    }  public int ge tPa sswo r d () {
   re t urn p assword;
    }    public  v o id  setPasswo r d() {       this.p asswo r d = pas sword;
   }
}

A: 
Youn e edto instant iate Use rInfo ins i de th e  O utput  cl ass be fo reyou c an use the  addU ser li st  that' s inUs erInfo.Then just call the getU ser()metho d t o returnthe lis t. Output  has  no
;
 _ _}

   _public void_UserList(){
_ __  _ int i=1;
_   _  _for(UserInfo_s : printDetails){

           _System.out.println("User:_"+i);
 ___    _   //s.outputDetails();

 _ _       _i++;
_  _    }
    }
}

class_output {
UserInfo userInfo;

public output(UserInfo userInfo){
 _  _this.userInfo_=_userInfo;
}

   _public void outputDetails(){
   _    int i=1;

_      _for(User m : userInfo.getUser()){//error addUser

 _    _ _   System.out.println("User: "+i);
_  _ _  _   System.out.println();
  _  _     _System.out.println("Name:_"+m.name);
  ___ _  __ System.out.println("Password:_"+m.password);
_     __    System.out.println();
  _   __   _i++;
    _   } System.out.println();
 _ _}
}

class UserInfo{

_    //This class is used to store the_user information in an arraylist
 _   private_ArrayList<User> addUser_=_new ArrayList<User>();

 __ _public void addUser(User b){
   _ _  addUser.add(b);
   _ }

  __public ArrayList<User> getUser(){
   _    return addUser;
_   }

 }

class_Info1_extends_User {

   _public Info1(String name, int password) {

_  _    super(name, password);

 __ }

 }

 class Info2 extends_User_{

    public Info2(String_name,_int_password) {

   _    super(name, password);

_   }

 }

abstract class User{

  _ String name;
_   int password;

___ public User(String name, int password){
    _ _ this.name =_name;
        this.password =_password;
    }

  _ public String getName(){
       _return name;
    }
  _ public void setName(){
   _   _this.name_= name;
    }
 ___public_int getPassword(){
 _  _  _return password;
_  _}
 _  public_void_setPassword(){
        this.password = password;
    }
}

A:

You need to instantiate_UserInfo inside the Output class before_you can use the addUser_list_that's in UserInfo._Then just call the_getUser() method to return the list. Output has_no