Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I would like to create a login feature with Java, where userID is HelloWorld & pwd is hello123. if login success, print Welcome, but if

image text in transcribed

I would like to create a login feature with Java, where

userID is HelloWorld & pwd is hello123.

if login success, print "Welcome", but if is unsuccessful, print "Invalid username or password".

Thank you :)

1 2 public class Clerk { 3 private String userID; 4 private String pwd; 5 6@ public Clerk (String userID, String pwd) { 7 super(); 8 this.userID = userID; 9 this.pwd = pwd; 10 } 11 120 public String getUserID() { 13 return userID; 14 } 15@ public void setUserID(String userID) { 16 this.userID = userID; 17 } 180 public String getpwd() { 19 return pwd; } 210 public void setpwd (String pwd) { 22 this.pwd = pwd; 23 } 24 } 25 |

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago