Question 1 You are required to complete the given code segment. a) Given a Java class...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 1 You are required to complete the given code segment. a) Given a Java class named Validate Bean.java with data members and methods. Complete the given code segment for getter method and validate() method in the ValidateBean.java. package login; public class ValidateBean { String name, password; public ValidateBean() { } public void setName(String name){this.name = name; } public String setPassword(String password) {this.password = password;} //i)get method for name and password // 2 marks public String validate(String n, String p) { //ii) implement the validate name and password // 2 marks } } (4 marks) Given a login.html page for user to insert username and password. Username Password Login Reset Figure 1. Login page. Based on the Validate Bean class defined in a), write a program segment for JSP page loginProcess.jsp that will retrieve the value input by user and produce the page as depicted in figure below. The JSP page must use JavaBean components for object creation and parameter retrieval with the combinations of JSP scripting elements to access functions available in class. (Assume username is admin and password is 123). Your username and password are Correct! Figure 2. Display page. (5 marks) Question 1 You are required to complete the given code segment. a) Given a Java class named Validate Bean.java with data members and methods. Complete the given code segment for getter method and validate() method in the ValidateBean.java. package login; public class ValidateBean { String name, password; public ValidateBean() { } public void setName(String name){this.name = name; } public String setPassword(String password) {this.password = password;} //i)get method for name and password // 2 marks public String validate(String n, String p) { //ii) implement the validate name and password // 2 marks } } (4 marks) Given a login.html page for user to insert username and password. Username Password Login Reset Figure 1. Login page. Based on the Validate Bean class defined in a), write a program segment for JSP page loginProcess.jsp that will retrieve the value input by user and produce the page as depicted in figure below. The JSP page must use JavaBean components for object creation and parameter retrieval with the combinations of JSP scripting elements to access functions available in class. (Assume username is admin and password is 123). Your username and password are Correct! Figure 2. Display page. (5 marks)
Expert Answer:
Answer rating: 100% (QA)
Heres the completed code segment for the ValidateBean class with the getter method and the valida... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Consider the following multithreaded pseudocode for transposing an n à n matrix A in place: Analyze the work, span, and parallelism of this algorithm. P-TRANSPOSE(A) 1 n = A.rows 2 parallel...
-
Match the description in Column I with its equation in Column II. I (a) Slope -0.5, b = -2 (b) x-intercept (4, 0), y-intercept (0, 2) (c) Passes through (4, -2) and (0, 0) 1 (d) m = passes through...
-
How do you measure a company's future financial health and how is it linked with Interest Rate Risk, Economic Risk, Credit Risk, and Operational Risk? What is the difference between Lower Growth...
-
Question 2: Consider the market for Florida oranges. The demand for Florida oranges is given by the inverse demand function p = 70-2Q The market cost function for firms that sell Florida oranges is...
-
Lakshmi Ltd. reports the following inventory transactions in a periodic inventory system for the month of June. A physical inventory count determined that 225 units were on hand at the end of the...
-
Q1. (a) Suppose the marginal revenue (MR) function of a monopolist is 5000-0.25Q, what is the profit maximizing price and quantity? (b) With the aid of illustrations, show or identify the demand,...
-
Anthony, CPA, prepared the flowchart on page 349 which portrays the raw materials purchasing function of one of Anthony's clients, a medium-sized manufacturing company, from the preparation of...
-
The July 1, 20X5, trial balance for the Bond Redemption and Interest Debt Service Fund of the County of Hawaii, Hawaii, is presented here. The resources of the fund are committed to debt service. The...
-
Given the ERD diagram create 4 queries that include GROUP BY, multi-table join, self join, non-correlated & correlated subqueries.
-
Perfect Parties, Inc. has several divisions, one of which provides birthday parties at their facility, and has provided the actual and planning budget results for the month of June. The Controller...
-
How did Martin Luther King challenge white supremacy and advance the Civil Rights Movement? What did Malcolm X mean when he talked about Black Nationalism? How do Martin Luther King and Malcolm X...
-
What change is needed to make Secret well encapsulated? A. Change number to use a protected access modifier. B. Change number to use a public access modifier. C. Declare a private constructor. D....
-
Which statement about encapsulation is not true? A. Encapsulation allows putting extra logic in the getter and setter methods. B. Encapsulation can use immutable instance variables in the...
-
Given the following method signature, which classes can call it? void run(String government) A. Classes in other packages B. Classes in the same package C. Subclasses in a different package D. All...
-
Fill in the blanks: It is possible to extend a(n) ______________ but not a(n) ______________. (Choose two.) A. interface, abstract class B. anonymous class, static nested class C. abstract class,...
-
What is the output of the Turnip class? A. 3 B. 5 C. The code does not compile. D. The code compiles but throws an exception at runtime. E. None of the above. package animal; interface GameItem { int...
-
Provide two reasons why: (a) Tax incentives may have only limited value in stimulating greater investment by business angels. (b) Business angels can be an attractive source of finance to...
-
Determine by direct integration the values of x for the two volumes obtained by passing a vertical cutting plane through the given shape of Fig. 5.21. The cutting plane is parallel to the base of the...
-
If Charles, a 16-year-old child model, earns $50,000 a year and is completely self supporting even though he lives with his parents, can his parents claim him as a dependent? Why or why not?...
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
What do you really enjoy doing? What is your passion? Can your passion be a platform for a viable opportunity?
-
What do your friends and family envision you doing? What strengths and weaknesses do they observe? How do their insights help lead you to an opportunity that is right for you?
-
Put several of your ideas through the opportunity checklist in Figure 3.10. Which ideas seem to have the highest potential? Customer Identifiable Demographics Psychographics Trends Macromarket Target...
Study smarter with the SolutionInn App