Skip to content
Snippets Groups Projects
Commit b5d53a5e authored by alec.schmidt's avatar alec.schmidt
Browse files

Delete Main.java

parent 18966a17
No related branches found
No related tags found
No related merge requests found
public class Main {
public static void main(String[] args) {
// Makeshift code as example
// New contact with random values
Contact test = new Contact();
test.setName("Contact1");
test.addFirstName("Prenom1");
test.addFirstName("Prenom2");
test.addAddress("Rte du Test, 25");
test.addMail("test1@address.com");
test.addSocial("MrContact");
test.addPhone("0227865425");
test.setJob("Ingénieur Informaticien");
// Let's add the contact to our phone book
Contacts contacts = new Contacts();
contacts.append(test);
// Was it correctly added ?
contacts.printContacts();
// Alrightimport Contact;
// let's add another
Contact test2 = new Contact();
test2.setName("Contact2");
test2.addFirstName("Prenom1");
test2.addFirstName("Prenom2");
test2.addAddress("Rte du Deuxième Test, 50");
test2.addMail("test2@address.com");
test2.addSocial("MrContact_Deuxieme");
test2.addPhone("0227865426");
test2.setJob("Maître Informaticien");
contacts.append(test2);
// Was it correctly added ?
contacts.printContacts();
// Okay it works, now we can try to remove one
contacts.remove(1);
// let's check it
contacts.printContacts();
/*
contacts.update(0);
contacts.printContacts();
*/
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment