Const int SETSIZE = 30;



????? ????????? Philadelphia University ??? ???????: Schema Marking QFO-AP-FI-QA07????? ???????: ???? ????????? ????????? ??? ??????? :Revision) ) 1????? ???????: ????? ??????? ??????? ??? ????? ???????: 1 Lecturer: Dr. Samer Odeh Hanna Internal Examiner: Dr. Moayad Adami Summer Semester of academic year: 2018-2019 Department of Software EngineeringCourse Name: Web Engineering 0721422 Date: 27/08/2019Time: 2 hours Final ExamInformation for Candidates: This examination paper contains 8 questions, totaling 50 marks.The marks for parts of questions are shown in round brackets.Advice to Candidates 1. You should attempt all questions. 2. You should write your answers clearly.I. Basic Notions Objective: This exam aims to check student abilities to understand the basic concepts of Web Engineering.Q1. (10) marksChoose the most correct answer:Please answer here1. A2. D3. C4. B5. A6. C7. A8. C9. C10. CWhat is the extension of MVC view when using C# is?cshtmlvbhtmlcsBoth A & CWe can send value from Controller to View in MVC?Using model objectUsing ViewBagUsing ViewDataAll of the aboveHow can you add a comment in a HTML?'This is a comment//This is a comment<!--This is a comment-->None of the aboveClient side validation for a Web application is More secure than server side validationFaster than server side validationFaster and more secure than server side validationNone of the above.To write client-side validation in Web applications we useJavaScriptXMLCSSC#Engineering Web applications means:Test Web Applications to assess different quality attributes.Modeling and designing Web applications by different tools.Developing Web applications according to sound principles, models, and methodsNone of the above.The first Web site, created by Tim Berners-Lee consisted of collection of documents with:Static contentDynamic Content.Both static and dynamic content.None of the above.In Model View Controller (MVC), the components that handle user interaction areViewsModelsControllersAll of the aboveWhat is the correct JavaScript syntax to write "Hello World"?System.out.println("Hello World")println ("Hello World")document.write("Hello World")Response.write("Hello World")What is the correct syntax for referring to an external script called " abc.js"?<script href=" abc.js"><script name=" abc.js"><script src=" abc.js">None of the aboveFigure 1. A class DiagramFamiliar Problems SolvingObjectives. The aim of the questions in this part is to evaluate that you have some basic knowledge of the key aspects of the lecture material and can attempt to solve familiar problems. Q2. (5) marksExplain 5 of the features that characterize Web applications.Answer:1. Higher accessibility of information and services: compared to closed desktop systems, the World Wide Web enables access to information and services for far more users simultaneously.2. Document-centric hypertext interface: the offered information and services have to be mapped onto a hypertext document.3. Variable technologies for data management: data is distributed on the Web in various formats, schemas, and technologies, such as XML, RDF, and traditional databases.4. Variable presentation technologies: different presentation formats must be addressed to accommodate the characteristics and display capabilities of different browsers and different devices.5. Architecture complexity: the higher level of accessibility requires distributed, multi-tier architectures for the access to information and services.Q3. (5) marksFor the Faculty of IT at Philadelphia University, suppose that we want to use MVC to display a list of the names of the departments in this faculty.Write the code of a controller class that has one action method to perform this task. [Note. Use ViewData to send the data from the controller to the view] (2 marks)Write the code of the View. (3 marks)Solution:1.public class HomeController : Controller { public ActionResult Index() { List<string> depts = new List<string>() { "Software Engineering", "Computer Science", "Web ENgineering" }; ViewData["departments"] = depts; return View(); } }2.@{ ViewBag.Title = "Students";}<h1>Web Engineering Students</h1><table border="1"> <tr> <th>Departments of IT</th> </tr> @foreach (string n in (List<string>)ViewData["departments"]) { <tr> <td>@n</td> </tr> }</table>Q4. (6) marksIn Q3, if we want to use MVC to display the following data for a single department at IT:Department name, number of students, and the date it was founded.Write the code of a controller class that has one action method to perform this task. (2 marks)Write the code of the model. (2 marks)Write the code of a view if the department data must be displayed in a table. (2 marks) Solution1.public class CompanyController : Controller { public ActionResult Details() { Dept d1 = new Dept() { Name = "Software Engineering", NoStudents = 200, Founded = new DateTime(2000, 9, 1) }; return View(d1); }}2.public class Dept { public string Name { get; set; } public int NoStudents { get; set; } public DateTime Founded { get; set; } }3.@model MvcDemo3.Models.Emp@{ ViewBag.Title = "Departments Details";}<h2> Departments Details</h2><table border="1"> <tr> <th>NAme</th> <td>@Model.Name</td> </tr> <tr> <th>Number of STudents</th> <td>@Model.NoStudents</td> </tr> <tr> <th>Founded</th> <td>@Model.Founded.ToShortDateString()</td> </tr></table>Q5. (6) marks Repeat Q4, if we want to display the data of all the departments at the Faculty of IT in a table.1.public class CompanyController : Controller { public ActionResult Details() { Dept d1 = new Dept() { Name = "Software Engineering", NoStudents = 200, Founded = new DateTime(2000, 9, 1) }; Dept d2 = new Dept() { Name = "Computer Science", NoStudents = 90, Founded = new DateTime(1999, 9, 1) }; List<Dept> depts = new List<Dept> ( ) { d1, d2} return View(depts); }}2.The same model in Q43.@model IEnumerable<MvcDemo5.Models.Course>@{ ViewBag.Title = "Departments";}<h2> Departments </h2><table border="1"> <tr> <th> Department name</th> <th>Number of students</th> <th>Founded</th> </tr>@foreach (var c in Model){ <tr> <td>@c.Name</td> <td>@c.NoSTudents</td> <td>@c.Founded</td> </tr>} </table>Q6. (6) marksIn Q5, if we want to store the departments data in an XML file.Write this XML file. (3 marks)Write the needed C# code to display the data in this XML file in a Web form. (3 marks)Q7. (6) marksSuppose that we want to build a Web application for a money exchange company; this application must contain two columns, the left column contains a table that contains different currencies with their convert ration while the right column contains the following inputs that is needed to make a transaction by a customer:Customer nameRequired currency Amount in Jordan Dinar (JD) the customer wants to exchangeTransaction dateDraw a design for this page. (1 mark)Write the needed HTML for this page. (4 marks)Write the needed CSS for this page. (1 mark)Unfamiliar Problems SolvingObjectives. The aim of the questions in this part is to evaluate that you can solve familiar problems with ease and can make progress towards the solution of unfamiliar problems, and can set out reasoning and explanation in a clear and coherent mannerQ8. (6) marksIn Q7, add the following validationsJavaScript based validation to make sure that the amount in Jordan Dinar (JD) inserted by a customer is between 1 and 100,000. (2 marks)C# based validation to make sure that a customer name length is between 2 and 40 characters. (2 marks)If a customer must insert his/her email as input, write an validation controls based validation for this input. (2 marks) ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download