Capgemini ADAPT 2022 – Contact App 2.0 Problem Solutions using Java

Capgemini ADAPT 2022 - Contact App 2.0 Problem Solutions using Java
Capgemini ADAPT 2022 - Contact App 2.0 Problem Solutions using Java

In this post, we will try to give a solution to an important problem of Capgemini ADAPT 2022. The solution to the Problem is – Contact App 2.0 Solution using Java.

However, the solutions are provided for learning purposes only. Candidates must submit their own code during attending the Sprints.

Contact App 2.0 Problem Solution using Java – Capgemini ADAPT:


import java.util.*;

class Contact
{
private String fName,lName,phNum,emailAdd;
public Contact(String fName, String lName, String phNum,String emailAdd)
{
this.fName=fName;
this.lName=lName;
this.phNum=phNum;
this.emailAdd=emailAdd;
}
public void setFname(String fName)
{
this.fName=fName;
}
public void setLname(String lName)
{
this.lName=lName;
}
public void setPhNum(String phNum)
{
this.phNum=phNum;
}
public void setEmailAdd(String emailAdd)
{
this.emailAdd=emailAdd;
}
public String getFname()
{
return fName;
}
public String getLname()
{
return lName;
}
public String getPhNum()
{
return phNum;
}
public String getEmailAdd()
{
return emailAdd;
}

}
class DAOLayer
{
public Contact searchPerson(ArrayList<Contact> al,String info)
{
Iterator<Contact> it=al.iterator();
while(it.hasNext())
{
if(it.next().getFname()==info)
{
Contact c=it.next();
System.out.println(“Name:”+c.getFname());
System.out.println(“LastName:”+c.getLname());
System.out.println(“Phone:”+c.getPhNum());
System.out.println(“Email:”+c.getEmailAdd());
return it.next();
}
}
return null;
}

public void addContact(ArrayList<Contact> al)
{
Iterator<Contact> it=al.iterator();
while(it.hasNext())
{
Contact c=it.next();
System.out.println(“Name:”+c.getFname());
System.out.println(“LastName:”+c.getLname());
System.out.println(“Phone:”+c.getPhNum());
System.out.println(“Email:”+c.getEmailAdd());
}
}
}

public class ContactApp
{
public static void main(String []args)
{
Scanner sc=new Scanner(System.in);
ArrayList<Contact> al=new ArrayList<Contact>();
String choice=sc.nextLine();
if(choice.equals(“1”))
{
String fn=sc.nextLine();
String ln=sc.nextLine();
String ph=sc.nextLine();
String e=sc.nextLine();
String fn1=sc.nextLine();
String ln1=sc.nextLine();
String ph1=sc.nextLine();
String e1=sc.nextLine();
Contact c1=new Contact(fn,ln,ph,e);
Contact c2=new Contact(fn1,ln1,ph1,e1);

al.add(c1);
al.add(c2);
DAOLayer obj1=new DAOLayer();
obj1.addContact(al);
}
else{
String fn=sc.nextLine();
DAOLayer obj=new DAOLayer();
obj.searchPerson(al,fn);
}

}
}


Note: We could not get the problem statement yet. If you have the problem statement you can send us at – [email protected] We will try to update the answers according to the problem statement.


Top Companies + Batchwise Hiring Drive:


TOP COMPANIES HIRING DRIVEBATCHWISE HIRING DRIVES
1. TCS OFF-CAMPUS DRIVES1. 2018 BATCH
2. INFOSYS OFF-CAMPUS DRIVES2. 2019 BATCH
3. COGNIZANT OFF-CAMPUS DRIVES3. 2020 BATCH
4. WIPRO OFF-CAMPUS DRIVES4. 2021 BATCH
5. CAPGEMINI OFF-CAMPUS DRIVES5. 2022 BATCH

To Stay Up-to-date, Follow us on Social Media:


1.      Join our Telegram Channel:Click Here
2.      Like us on Facebook:Click Here
3.      Follow us on Instagram:Click Here
4.      Follow us on LinkedIn:Click Here
5.      Follow us on Google News:Click Here

ADAPT Different Coding Solutions:


  1. Largest Array Solution – Click Here
  2. Batsman & Bowler Solution – Click Here
  3. Instruments Problem Solution – Click Here
  4. Check Two Person Are Same – Click Here
  5. Medicine App ADAPT Solution – Click Here
  6. String Combination Capgemini ADAPT Solution – Click Here
  7. Remove”X”inString Problem Solution – Click Here
  8. Customer and Invoice ADAPT Problem Solution – Click Here
  9. Book and Author Problem Solution – Click Here
  10. Highest Feedback Problem Solution – Click Here
  11. Registered Customer Problem Solution in Java – Click Here
  12. Product of Digits Problem Solution – Click Here
  13. Change Using Minimal Coins/Notes Solution in Java – Click Here

Capgemini ADAPT Sprint 1 (Bus Reservation Solutions):


  • 1. Capgemini ADAPT Sprint 1 Bus Reservation System – DisplayCustomerInAscendingOrder Problem Solution
  • 2. Capgemini ADAPT Sprint 1 Bus Reservation System – DisplayCustomerByFirstName Problem Solution
  • 3. Capgemini ADAPT Sprint 1 Bus Reservation System – SortByCustomerId Problem Solution
  • 4. Capgemini ADAPT Sprint 1 Solution Java | LSAByCustomerName Problem Solution
  • 5. Capgemini ADAPT Sprint 1 Case Study Solution Java | BSAByCustomerId Problem Solution

Capgemini ADAPT Sprint 2 (Bus Reservation System):


  • 1. Capgemini ADAPT Sprint 2 Case Study (Bus Reservation System) Solution | HAS-A-Relationship Solution Java
  • 2. Capgemini ADAPT Sprint 2 Case Study (Bus Reservation System) Solution OOPs-Para-Constructor Java
  • 3. Capgemini ADAPT Sprint 2 Bus Reservation System (CRUDOperations) Problem Solution

ADAPT Sprint 3 Solutions – Capgemini (Toy Rental A):


Online Shopping A Solutions Using Java:


  • 1. Capgemini ADAPT 2022 Online Shopping A – Display Products Solution using JAVA – Click Here
  • 2. Capgemini ADAPT 2022 Online Shopping A – Products by Category Solution using JAVA – Click Here
  • 3. Capgemini ADAPT 2022 Online Shopping A – Customer Array Solution using JAVA – Click Here
  • 4. Capgemini ADAPT 2022 Online Shopping A – Search Customers by Name Solution using JAVA – Click Here
  • 5. Capgemini ADAPT 2022 Online Shopping A – Search Customers by City Solution using JAVA – Click Here
  • 6. Online Shopping A – Customer & Address Class Solution | Capgemini ADAPT 2022 Solutions – Click Here