Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class Users {
- String name;
- String contact_no;
- String email_address;
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public String getContact_no() {
- return contact_no;
- }
- public void setContact_no(String contact_no) {
- this.contact_no = contact_no;
- }
- public String getEmail_address() {
- return email_address;
- }
- public void setEmail_address(String email_address) {
- this.email_address = email_address;
- }
- public static boolean authenticate(int userID,String password){
- return true;
- }
- public static void main(String args[]) {
- while(true) {
- Scanner sc=new Scanner(System.in);
- System.out.println("Enter 1 to login and 2 to continue as unregistered user: ");
- int t=sc.nextInt();
- sc.nextLine();
- if(t==1) {
- System.out.println("Enter user ID : ");
- int userID=sc.nextInt();
- sc.nextLine();
- System.out.println("Enter password: ");
- String password=sc.nextLine();
- boolean result= authenticate(userID,password);
- if(result==true) {
- System.out.println("Choose from the following options: ");
- System.out.println("1. Call");
- System.out.println("2. Email");
- System.out.println("3. Live Chat");
- System.out.println("4. Video Call");
- System.out.println("5. Forums");
- System.out.println("6. Feedback");
- System.out.println("7. Documentation");
- System.out.println("8. Report Bug");
- System.out.println("9. Request Technician");
- System.out.println("10. Check Account History");
- int option=sc.nextInt();
- sc.nextLine();
- switch(option) {
- case 1: CallAndEmail ob=new CallAndEmail();
- ob.call();
- break;
- case 2: CallAndEmail ob1=new CallAndEmail();
- ob1.email();
- break;
- case 3: Chat lc=new Chat();
- lc.liveChat();
- break;
- case 4: Chat lc1=new Chat();
- lc1.videoCall();
- break;
- case 5: Forums f=new Forums();
- System.out.println("What do you want to do: ");
- System.out.println("1. Post Query");
- System.out.println("2. Read Post");
- System.out.println("3. Answer Query");
- int te=sc.nextInt();
- if(te==1) {
- f.postQuery();
- }
- else if(te==2) {
- f.readForums();
- }
- else if(te==3) {
- f.answerQuery();
- }
- else {
- System.out.println("Wrong input");
- }
- break;
- case 6:Feedback fd=new Feedback();
- String feedback;
- System.out.println("Enter your feedback: ");
- feedback=sc.nextLine();
- fd.write(feedback);
- break;
- case 7: Documentation doc=new Documentation();
- break;
- case 8: ReportBug rb=new ReportBug();
- rb.reportBug();
- case 9: break;
- case 10: break;
- }
- }
- else {
- System.out.println("Press 1 to try again and 2 to exit");
- int test=sc.nextInt();
- if(test==2) {
- break;
- }
- else {
- continue;
- }
- }
- }
- else {
- System.out.println("Choose from the following options: ");
- System.out.println("1. Call");
- System.out.println("2. Email");
- System.out.println("3. Forums");
- System.out.println("4. Feedback");
- System.out.println("5. Documentation");
- }
- }
- System.out.println("Thank you for using our portal");
- }
- }
Add Comment
Please, Sign In to add comment