2. public static void main(String[] args) { // Declare variables // Prompt user: firstname, lastname, birthyear, security question // call email registration method // call password method // call result screen method } // email registration method (Overloading methods) public static String defaultInfo(String first, String last) ( // password method (Overloading methods) public static String defaultInfo(String last, String question, int year) { } // result screen method public static void resultscreen(String first, String last, String email, String pw) { System.out.println("=====▬▬▬▬▬▬▬▬▬▬- System.out.println(first + + last); System.out.println("Kean email: " + email); System.out.println("Kean password: + password); System.out.println("======== Enter first name: LeBron Enter last name: James LeBron James Kean email: 1.james@kean.edu Kean password: LEB1984BEN ⠀⠀⠀⠀ (Security Question) Favorite car maker: Bentley Enter birth year: 1984 ======= *** --------- =========="); Figure 2. Method headers Enter first name: Elon Enter last name: Musk (Security Question) Favorite car maker: Tesla Enter birth year: 1971 ------------ ‒‒‒‒‒‒===== Elon Musk Kean email: e.musk@kean.edu Kean password: EL01971TES -=-=-=-= **** ====== Figure 3. Sample Runs [Implementation] Code the main method and the overloaded method, defaultinfo, as shown in Figure 2. Run it two times to check if the program works. (Useful Hints on the next page)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 23PE
icon
Related questions
Question
Copy& paste your code and screenshot your console output. Please follow the instructions. Thankyou
Assume you are working for a company and given the task to build an Email Registration Program. The email
registration program functions as follows.
Prompt the user four things: first name, last name, security question answer, and birthyear.
0
Example:
Enter first name: LeBron
Enter last name: James
(Security Question) Favorite car maker: Bentley
Enter birth year: 1984
Generate a default Kean email address based on the first name and last name.
O
The default Kean email address consists of the first letter of the first name, a period, the entire
last name all in lower case appended with @kean.edu.
0 Example: LeBron James →l.james@kean.edu
Generate a default password based on the first name, security question answer, and birthyear.
O
The default password is a sequence of 3 letters from last name, birthyear, and 3 letters from the
security question answer all in upper case.
O
Example: LeBron, 1984, Bentley → LEB1984BEN
Display the email information with first name, last name, email address, and password.
0
Example:
LeBron James
Kean email: l.james@kean.edu
Kean password: LEB1984BEN
1. [Communications and Facilitating Teamwork] Assume you are the team leader with 4 team members to build
this program where you use the divide-and-conquer strategy, (also known as stepwise refinement) to
decompose this into subproblems where subproblems can be implemented using a method. Based on the
structure chart in Figure 1, the code with method headers in Figure 2, and the sample runs in Figure 3, how
would you explain to your team members on how to build this program. (See Rubric)
For each below, specify in no more than three sentences,
A. what each method should do including the main method,
B. what arguments (or value) are passed from the main method to all the other methods,
C. what should the return values be coming back to the main method.
Note: You are using overloading methods (i.e., same method name with different parameter lists)
Transcribed Image Text:Assume you are working for a company and given the task to build an Email Registration Program. The email registration program functions as follows. Prompt the user four things: first name, last name, security question answer, and birthyear. 0 Example: Enter first name: LeBron Enter last name: James (Security Question) Favorite car maker: Bentley Enter birth year: 1984 Generate a default Kean email address based on the first name and last name. O The default Kean email address consists of the first letter of the first name, a period, the entire last name all in lower case appended with @kean.edu. 0 Example: LeBron James →l.james@kean.edu Generate a default password based on the first name, security question answer, and birthyear. O The default password is a sequence of 3 letters from last name, birthyear, and 3 letters from the security question answer all in upper case. O Example: LeBron, 1984, Bentley → LEB1984BEN Display the email information with first name, last name, email address, and password. 0 Example: LeBron James Kean email: l.james@kean.edu Kean password: LEB1984BEN 1. [Communications and Facilitating Teamwork] Assume you are the team leader with 4 team members to build this program where you use the divide-and-conquer strategy, (also known as stepwise refinement) to decompose this into subproblems where subproblems can be implemented using a method. Based on the structure chart in Figure 1, the code with method headers in Figure 2, and the sample runs in Figure 3, how would you explain to your team members on how to build this program. (See Rubric) For each below, specify in no more than three sentences, A. what each method should do including the main method, B. what arguments (or value) are passed from the main method to all the other methods, C. what should the return values be coming back to the main method. Note: You are using overloading methods (i.e., same method name with different parameter lists)
public static void main(String[] args) {
// Declare variables
// Prompt user: firstname, lastname, birthyear, security question
// call email registration method
// call password method
// call result screen method
}
// email registration method (Overloading methods)
public static String defaultInfo(String first, String last) {
// password method (Overloading methods)
public static String defaultInfo(String last, String question, int year) {
// result screen method
public static void resultscreen(String first, String last, String email, String pw) {
=========
System.out.println("========
System.out.println(first
System.out.println("Kean email:
System.out.println("Kean password: + password);
System.out.println("=
Enter first name: LeBron
Enter last name: James
LeBron James
Kean email: 1.james@kean.edu
Kean password: LEB1984BEN
====
+ " " + last);
(Security Question) Favorite car maker: Bentley
Enter birth year: 1954
======
+ email);
Figure 2. Method headers
Enter first name: Elon
Enter last name: Musk
(Security Question) Favorite car maker: Jesla
Enter birth year: 1971
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀====----
Elon Musk
Kean email: e.musk@kean.edu
Kean password: EL01971TES
------
========
Figure 3. Sample Runs
2. [Implementation] Code the main method and the overloaded method, defaultInfo, as shown in Figure 2. Run
it two times to check if the program works. (Useful Hints on the next page)
Transcribed Image Text:public static void main(String[] args) { // Declare variables // Prompt user: firstname, lastname, birthyear, security question // call email registration method // call password method // call result screen method } // email registration method (Overloading methods) public static String defaultInfo(String first, String last) { // password method (Overloading methods) public static String defaultInfo(String last, String question, int year) { // result screen method public static void resultscreen(String first, String last, String email, String pw) { ========= System.out.println("======== System.out.println(first System.out.println("Kean email: System.out.println("Kean password: + password); System.out.println("= Enter first name: LeBron Enter last name: James LeBron James Kean email: 1.james@kean.edu Kean password: LEB1984BEN ==== + " " + last); (Security Question) Favorite car maker: Bentley Enter birth year: 1954 ====== + email); Figure 2. Method headers Enter first name: Elon Enter last name: Musk (Security Question) Favorite car maker: Jesla Enter birth year: 1971 ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀====---- Elon Musk Kean email: e.musk@kean.edu Kean password: EL01971TES ------ ======== Figure 3. Sample Runs 2. [Implementation] Code the main method and the overloaded method, defaultInfo, as shown in Figure 2. Run it two times to check if the program works. (Useful Hints on the next page)
Expert Solution
steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,