0% found this document useful (0 votes)
94 views6 pages

TTG Web Programming Mock Assessment

The document describes a mock web programming assessment with 5 questions. Question 1 involves login/registration functionality. Question 2 displays city descriptions from dropdown. Question 3 validates a web form with JavaScript. Question 4 involves writing SQL queries. Question 5 displays employee/manager data from a database table.

Uploaded by

vinukj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views6 pages

TTG Web Programming Mock Assessment

The document describes a mock web programming assessment with 5 questions. Question 1 involves login/registration functionality. Question 2 displays city descriptions from dropdown. Question 3 validates a web form with JavaScript. Question 4 involves writing SQL queries. Question 5 displays employee/manager data from a database table.

Uploaded by

vinukj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Version 1.

1
Time 4 hours

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60

1. Login
logged in user to logout from the application.

Marks - 20

The web application is used to register a user and allow registered user to login. It also allows a

Fig 1 (Login)

Fig 2 (Registration)

Fig 3 (Home)

Description 1.1. Login page (Fig 1). This screen has two actions submit and here. 8 a) submit This action is used to login a registered user. User enters username and password and clicks on submit, the application authenticates the credentials provided against the data present in the system. On successful authentication, user will be redirected to Home page (Fig 3). b) here This action is used to register a new user. User clicks on the here link and he gets redirected to the registration Fig 2. 1.2. Registration page (Fig 2). This screen has one action as submit. 8 a) submit - This action is used to register a new user. User enters username and password and clicks on submit button, the application stores the credentials provided. On successful registration, user will be redirected to Login page (Fig 1). 1.3. Home page (Fig 3). This screen shows the Welcome message and it has one action as Logout 4 a) This screen shows the message in the format as Welcome <username> where <username> is the logged in username. b) Logout This is a hyperlink which when clicked logs out the user from the current session and he is redirected to the Login page (Fig 1) Assumptions / Hint I. II. Application doesnt use database. Instead, it uses the text file (records.txt) as the data source to store the registered user details. Hint: Session scope should be used to display the username on Home page.

Talent Transformation Group

MindTree Ltd

Version 1.1
Time 4 hours

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60 Marks - 10

2. City & Description


This web page is used to view the description about a city.

Fig 4 (View)

Description User selects the City from the drop down and the corresponding description gets displayed. 2.1. View page (Fig 4) when accessed loads the City drop down with all the cities. 6 2.2. When user selects another city from the drop down, it display the description about the city. 4 Assumptions / Hint I. II. III. You should not use database to store/read the city and description details. Use your own data structure to store the city and description in the server side memory. Use the following data to store in the server memory that you will use on the view page City Mumbai Chennai Description Commercial capital of India Capital of Tamilandu, India

Bengaluru Garden City

Talent Transformation Group

MindTree Ltd

Version 1.1
Time 4 hours

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60 Marks - 10

3. Validate me!
You need to validate the following web form using Java Script.

Fig 5 (Validate)

Description Check Form button when clicked validates the form as per the below rule. 3.1. 3.2. 3.3. 3.4. 3.5. All the form fields are mandatory Username should be between 6 and 8 characters. Pin should be numeric States should be selected Add en email field to the validate page (Fig 5) and validate email address. 2 2 2 2 2

Assumptions / Hint I. You can print the <Form field> not validated anywhere on the screen or as alert. E.g. Pin not validated II. Populate the States drop down with options as option1, option2 III. Use the regular expression to validate the email field. The regular expression for email is given below /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/

Talent Transformation Group

MindTree Ltd

Version 1.1
Time 4 hours

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60 Marks - 5

4. Query Me!

This question contains two parts (a) and (b). Answer any one of the following. Your deliverables are SQL query in a file. a) Employee Department Employee
SSN 1111 2222 3333 4444 5555 Name Deepak Nandagopal Pooja Prasad Reena B_Date 5-Jan-1962 10-Dec-1960 22-Jan-1965 11-Jan-1957 15-Jan-1985 Address Malleswaram Rajajinagar Indiranagar Rajajinagar MG Road Sex M M F M F Salary 22000 30000 18000 32000 8000 Super_SSN 4444 4444 2222 null 4444

D_No 1 3 2 3 3

Department D_Number 1 2 3 D_Name Admin Research Accounts Mgr_SSN Mgr_Start_Date 1111 23-Jan-2000 2222 11-Aug-1995 4444 7-Dec-1986

Project P_Number P_Name Library 10 Management 20 ERP Hospital 30 Management 40 Wireless Network P_Location D_Num USA Chennai Mumbai London 2 1 3 2

Description I. Write a SQL query to retrieve the SSN of all employees who either work in accounts department or directly supervise an employee who works in Accounts department.

Talent Transformation Group

MindTree Ltd

Version 1.1
Time 4 hours b)

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60 5

Purchase Record PURCHASES Cust_Id 1 3 1 1 3 DT_Purchased


(DD/MM/YYYY)

CUSTOMERS Amount 100 50 200 500 20 Cust_Id 1 2 3 Name Adam Bob Cathy

3/1/2012 13/1/2012 12/12/2011 23/1/2012 31/1/2012

Description I. Write a SQL query which lists the total amount spent by each customer for purchasing items from a store in the current month o If the customer has not purchased anything in the current month, the total amount should be indicated as 0. o The query result has to be sorted in the ascending order of the total amount.

Assumptions / Hint I. Sample output based on the sample data given in the above tables. Cust_Id 2 3 1 Total_Amount 0 70 600

Talent Transformation Group

MindTree Ltd

Version 1.1
Time 4 hours .

[WEB PROGRAMMING MOCK ASSESSMENT]

January 31, 2012 Total Marks - 60

5. Employee Details

Marks - 15

This web app consists of Employee details page (Fig 6) which displays the team member and their managers name by fetching it from the database table Employee (Fig 7).

Employee Details
Team Member Rohit Arun Sangeeta Manager Sanjay Sanjay Zaheer

Fig 6 (Employee details page)

ID 121 101 103 145 150

Name Rohit Sangeeta Sanjay Arun Zaheer

Manager 103 150 null 103 null

Fig 7 (Employee table)

Description 5.1. Create the database table Employee as shown in Fig 7 and submit the DDL & DML as your deliverable. 3 5.2. Create a data access layer method which reads manager and his team members details from the database table Employee 7 5.3. Create Employee details page (Fig 6) which displays the team member and their managers name by fetching it from the database table Employee (Fig 7). 5

Assumptions / Hint I. Hint: Employee table should be created with proper primary and foreign key relationships. ***

Talent Transformation Group

MindTree Ltd

You might also like