Epic Systems Interview Question for Developer Program Engineers


Country: United States




Comment hidden because of low score. Click to expand.
1
of 1 vote

public class PasscodeErrorAllow {

	public static void main(String[] args)
	{
		String passcode="18283";
		String given="123";
		boolean matches=checkPasscode(passcode,given);
		System.out.println(matches);
	}
	public static boolean checkPasscode(String passcode,String given)
	{		
		if(removeAll(passcode,0).equals(given))
			{   System.out.println("passcode:"+passcode+",given:"+given);
				return true;
			}
		if(removeAll(passcode,1).equals(given)) return true;
		if(removeAll(passcode,2).equals(given)) return true;
		if(removeAll(passcode,3).equals(given)) return true;
		if(removeAll(passcode,4).equals(given)) return true;
		if(removeAll(passcode,5).equals(given)) return true;
		if(removeAll(passcode,6).equals(given)) return true;
		if(removeAll(passcode,7).equals(given)) return true;
		if(removeAll(passcode,8).equals(given)) return true;
		if(removeAll(passcode,9).equals(given)) return true;
			
		return false;
	}
	public static String removeAll(String passcode,Integer no)
	{
		String result =passcode.replace(no.toString(), "");
		return result;
	}
}

- Anonymous June 04, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Hello Tony, could you please provide an example, the one you have provided is not very clear. what do you mean by 124 is acceptable if we actually have "126 46.." as key code?

- madhur.eng May 10, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

In 1-9 keypad one key is not working. If someone enters a password then not working key will not be entered. You have given expected password and entered password. Check that entered password is valid
or not. Ex: entered 164, expected 18684 (you need to take care as when u enter 18684 and 164 only both will be taken as 164 input)

- Anonymous May 12, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

In 1-9 keypad one key is not working. If someone enters a password then not working key will not be entered. You have given expected password and entered password. Check that entered password is valid
or not. Ex: entered 164, expected 18684 (you need to take care as when u enter 18684 and 164 only both will be taken as 164 input)

- Anonymous May 12, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

public class PasscodeErrorAllow {

public static void main(String[] args)
{
String passcode="18283";
String given="123";
boolean matches=checkPasscode(passcode,given);
System.out.println(matches);
}
public static boolean checkPasscode(String passcode,String given)
{
if(removeAll(passcode,0).equals(given))
{ System.out.println("passcode:"+passcode+",given:"+given);
return true;
}
if(removeAll(passcode,1).equals(given)) return true;
if(removeAll(passcode,2).equals(given)) return true;
if(removeAll(passcode,3).equals(given)) return true;
if(removeAll(passcode,4).equals(given)) return true;
if(removeAll(passcode,5).equals(given)) return true;
if(removeAll(passcode,6).equals(given)) return true;
if(removeAll(passcode,7).equals(given)) return true;
if(removeAll(passcode,8).equals(given)) return true;
if(removeAll(passcode,9).equals(given)) return true;

return false;
}
public static String removeAll(String passcode,Integer no)
{
String result =passcode.replace(no.toString(), "");
return result;
}
}

- Anonymous June 04, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

public class faulty {
	
	public static void main(String[] args)
	{
		String given_password = "164";
		String exp_password = "18684";
		
		boolean flag = false;
		
		for(Character i='0'; i<='9'; i++)
		{
			String possible_password = exp_password.replaceAll(i.toString(),"");
			if(possible_password.equalsIgnoreCase(given_password))
			{
				System.out.println("Password Accepted");
				flag = true;
				break;
			}
			
		}
		
		if(flag==false)
		{
			System.out.println("Password is incorrect");
		}
	}

}

- nahidcse05 June 04, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

import java.util.Scanner;


public class OnekeyNotWorking {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);



String number = in.next();
String notWorking = in.next();
String userEntered = in.next();

String newNumber = number.replace(notWorking,"");
System.out.println(newNumber);

if(newNumber.equals(userEntered)) {
System.out.println("Password correct");
} else {
System.out.println("Wrong");
}

}
}

- ven July 07, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

import java.util.Scanner;


public class OnekeyNotWorking {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);



String number = in.next();
String notWorking = in.next();
String userEntered = in.next();

String newNumber = number.replace(notWorking,"");
System.out.println(newNumber);

if(newNumber.equals(userEntered)) {
System.out.println("Password correct");
} else {
System.out.println("Wrong");
}

}
}

- ven July 07, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More