Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Now your system will be extended to store emails Create another method, also cal

ID: 3682629 • Letter: N

Question


Now your system will be extended to store emails Create another method, also called StoreCredentials that will store the user name and email of a user in a 20 array calles UsertNamesAndfmaits[]. This method will call the method CreateAccount and additionally ask the user for her email. Write the pseudocode (or the method StoroCredentials that also Stores emails. Write the java code for the method StoreCredentials that also store emails. Assume that StoreCredentials is called with the userNumber variable holding the value "4", the fourth user in the system. Trace how your method would work to create the credentials (or the third user m the system with the username "mary", email "mary@domain.com' and password "504".

Explanation / Answer

Pseudocode: StoreCredentials(userNumber,username): for i=0 to UserNameAndEmails.length-1 if i==userNumber UserNameAndEmails[i][0]=username UserNameAndEmails[i][0]=CreateAccount(userNumber) JAVA Code: public static void StoreCredentials(int userNumber, String userName) { for(int i=0,i