· 7 years ago · Mar 03, 2019, 12:18 PM
1Problem Statment:-
2
3
4
5Create a web application which is used to design an event registration.
6
7
8The event registration application form should have the following layout.
9
10
11Create a form with id="createEvent". Arrange the form components inside a table. The table should have id="eventForm" and the following characteristics { border= 1px solid black;width=80%;align=center}.
12
13
14The table should have 2X9 dimension.
15
161) There is an application form header as "Event Management System" in <h1>
17
18
19
202) Add a <hr> after the header.
21
22
23
243) Create a div with id="creationDiv" by default display should be blocked.
25
26
27
284) Create the event creation form inside the "creationDiv".
29
30
31
325) The form should have a page header as "Event Creation Form" <h2> tag in the next line.
33
34
35
366) The background color of the table should be "#FE45E0"
37
38
39 Event Management System {in <H1>}
40
41 Event Creation Form {in <H2>}
42 -------------------------------------------------------------------------
43 | Event Id | 10001 |
44 -------------------------------------------------------------------------
45 | Department | Finance |
46 -------------------------------------------------------------------------
47 | Status | Open |
48 -------------------------------------------------------------------------
49 | Description | My pay slip not generated |
50 | | |
51 | | |
52 | | |
53 -------------------------------------------------------------------------
54 | Raised By | RamKumar |
55 -------------------------------------------------------------------------
56 | Contact Phone | 9874563210 |
57 -------------------------------------------------------------------------
58 | [ Create ] [ Cancel ] |
59 -------------------------------------------------------------------------
60
61
62
637) The element details and validations are following;
64
65
66
67Label Control Validation Control id value Error Span Id
68Event Id Number Mandatory id="eventId" id="err1"
69Department Dropdown Mandatory id="department" id="err2"
70Status Dropdown Mandatory id="status" id="err3"
71Description Text Mandatory id="description" id="err4"
72Raised By Text Mandatory id="raisedBy" id="err5"
73Contact Phone Text Mandatory id="contactPhone" id="err6"
74Create Submit id="create"
75Cancel Reset id="cancel"
76
77
788) Department is a drop down with following values [Admin, HR, Finance, Network].
79
80
81
829) Status is a drop down with following values [Open, In Progress, Rejected, Complete].
83
84
85
8610) Upon clicking the [Create] button, it needs to perform all validations.
87
88
89
9011) Write a javascript method validateCreation() for validating the components.
91
92
93
9412) If there is any validation error, it needs to be displayed in a <span> tag beside the corresponding component in red font.
95
96
97
9813) If validation is succeeded, then show a message as shown below in another div with div id="resultDiv". During that time hide the creation form.
99
100
101
102 An event is created with event id = 10001.
103
104 Department : Finance
105 Status : Open
106 Raised By : RamKumar
107
108 [ Close ]
109
110
111
112
113
11412) In the "resultDiv", there should be 'close' button (with id="close"). Upon clciking the same the "resultDiv" need to close and "creationDiv" need to display.
115
116
117
118Note:
119
120All the styles need to be implemented using inline.
121
122All the script need to write in .js file.
123
124
125
126Things to remember
127
128Before proceeding the coding, install the required dependencies using the menu Run->Install
129
130Once the coding is done, run the application in built-in server available. To start the server go to Run -> Run Server.
131
132After verifying the application, before submitting the implementation click on the Run Test button and ensure that every test cases are cleared.
133
134If everything is fine Submit the code using the Submit button.
135
136///////////////////////////////////////////////////////////////////////////////////////////////////////////
137Unix : FindDeptEmployeeCount
138Please click on Run->Install on the top left of the project explorer before proceeding to set up the environment.
139
140
141
142Once done, write a shell script to find the count of employees working in a given department. The employee details are stored in a file called employees.txt. The filename and the name of the department will be given as command line argument while executing the script. Write your script in the file script.sh in the project explorer.
143
144
145
146The filename having the employee details will be given as 1st command line argument and the department name will be given as 2nd command line argument.
147
148
149
150Incorporate the following validations in the script :
151
152
153
154i. Whether correct number of command line arguments are passed while running the script or not.
155
156ii. Whether the given input file exists or not.
157
158iii. Whether the given input file is an ordinary file or not.
159
160iv. Whether the given input file is readable or not.
161
162
163
164Print appropriate messages in each case as per the messages shown in the examples below.
165
166
167
168Please save your code using Ctrl+S in the project explorer.
169
170
171
172Examples :
173
174
175
176Note : Please refer to the files present in the project explorer for understanding the below examples
177
178
179
180i. If the script is executed as
181
182bash script.sh,
183
184
185
186the output should be
187
188Pass appropriate number of command line arguments
189
190
191
192ii. If the script is executed as
193
194bash script.sh abc.txt IT
195
196where abc.txt is the input file and IT is the department name, but abc.txt does not exist then,
197
198
199
200the output should be
201
202The input file does not exist
203
204
205
206iii. If the script is executed as
207
208bash script.sh myDir IT
209
210where myDir is the input file and IT is the department name, but myDir is a directory file not an ordinary file, then,
211
212
213
214output should be
215
216Input file is not an ordinary file
217
218
219
220
221
222iv. If the script is executed as
223
224bash script.sh testfile IT
225
226where testfile is the input file and IT is the department name, but testfile does not have read permission, then,
227
228
229
230the output should be
231
232Input file does not have read permission
233
234
235
236v. If the script is executed as
237
238bash script.sh employees.txt IT
239
240where employees.txt is the input file and IT is the department name, then
241
242
243
244the output should be
245
2464
247
248
249
250
251
252Note : Please print the exact messages as shown in the examples in your script. If exact messages are not used, test cases will fail.
253
254
255
256Once you have completed your code, click on Run -> Run Server to check the output of your script.
257
258Also, you can try executing your script in the command prompt by clicking on the New Terminal button on the right side corner of the project explorer.
259
260Additionally, to check the status of the test cases, please click on Run Test below the project explorer to execute the test cases. The status of the test cases will be shown on the terminal. Please check the file testCases.txt for additional details of the test cases.