SE-3003 Web Engineering Final Exam
45 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

The API route to retrieve all doctors' information is defined as POST /api/doctors.

False

The sample data for doctors includes an entry for a doctor named Dr.John Smith who specializes in Cardiology.

True

The ExpressJS application handles API calls with a default method of POST.

False

In the sample code provided, a specific doctor's information can be retrieved using the route GET /api/doctors/456.

<p>False</p> Signup and view all the answers

The data structure for each doctor includes exactly 4 attributes: id, name, designation, and specialization.

<p>False</p> Signup and view all the answers

The useEffect hook in ReactJS is used to handle user input in forms.

<p>False</p> Signup and view all the answers

The React Context API is primarily used for managing state in class components.

<p>False</p> Signup and view all the answers

Data is provided to components using the React Context API by defining a context object and using a Provider component to wrap the desired components.

<p>True</p> Signup and view all the answers

Redux is primarily used to enable server-side rendering of React components.

<p>False</p> Signup and view all the answers

The 'dispatch' function in Redux updates the store by applying the specified action.

<p>True</p> Signup and view all the answers

BrowserRouter is the primary routing component used in React Routing v6.

<p>True</p> Signup and view all the answers

The useHistory hook is used to navigate programmatically in React Routing v6.

<p>False</p> Signup and view all the answers

It is a standard practice to store JWT Secrets in a JSON file.

<p>False</p> Signup and view all the answers

The specialization of the doctor in the provided code is Pediatrics.

<p>False</p> Signup and view all the answers

The output on the console when the component is rendered for the first time includes 'Component rendered successfully'.

<p>False</p> Signup and view all the answers

The DELETE endpoint in the API returns a message stating 'Doctor deleted successfully.' when a doctor is deleted.

<p>True</p> Signup and view all the answers

The doctor is found in the system when a valid ID is provided to the PUT API endpoint.

<p>True</p> Signup and view all the answers

The output displayed on the web page when the button is clicked for the first time is 'I'm Not Ready!'.

<p>False</p> Signup and view all the answers

The application uses a hook called useEffect which runs only when the component mounts.

<p>False</p> Signup and view all the answers

If a doctor with the given ID is not found in the database, the DELETE request will return a 200 status code.

<p>False</p> Signup and view all the answers

In the given sample code, clicking the button calls the setReady function with false.

<p>False</p> Signup and view all the answers

The useEffect hook is called every time the component re-renders.

<p>False</p> Signup and view all the answers

SetTimeout is used to delay the execution of fetchMessages by one second.

<p>True</p> Signup and view all the answers

The ChildC component directly receives props without any parent components passing them down.

<p>False</p> Signup and view all the answers

Context API is useful for passing data without prop drilling in deeply nested components.

<p>True</p> Signup and view all the answers

The UserContext is created using the createContext method from React.

<p>True</p> Signup and view all the answers

SetMessages function updates the state directly without any arguments.

<p>False</p> Signup and view all the answers

If user state in the Parent component is an empty array, ChildC will print 'Username is: ' with no value.

<p>True</p> Signup and view all the answers

React Router is not applicable to a multi-level navigation structure in a React application.

<p>False</p> Signup and view all the answers

The output of the given function will display 'Item 1' and 'Item 2' on the screen.

<p>False</p> Signup and view all the answers

The code provided for PostList will show 'No posts available.' if there are no posts.

<p>True</p> Signup and view all the answers

In the ChatWindow component, messages are fetched from the API each time the component is rendered.

<p>False</p> Signup and view all the answers

The PostList component correctly maps over posts using 'posts.title' and 'posts.body'.

<p>False</p> Signup and view all the answers

The return statement in the App function does not properly return any JSX because of missing parentheses.

<p>True</p> Signup and view all the answers

The fetchMessages function will log an error message to the console if the API call fails.

<p>True</p> Signup and view all the answers

The mapping function used in the ChatWindow component correctly displays 'message.text'.

<p>False</p> Signup and view all the answers

The given code guarantees that messages will be displayed as a list in the ChatWindow component.

<p>False</p> Signup and view all the answers

The Admin Dashboard route is identified by the path '/admin/home'.

<p>False</p> Signup and view all the answers

The Redux slice named 'posts' in the given code has an initial state containing an empty array for posts.

<p>True</p> Signup and view all the answers

In the ProfileComponent, the useEffect dependency array includes the 'posts' variable.

<p>True</p> Signup and view all the answers

The fetch_posts action immediately updates the state with the fetched posts data.

<p>False</p> Signup and view all the answers

The configureStore function is imported from '@redux/react'.

<p>False</p> Signup and view all the answers

The path '/products/:id' allows access to specific product details based on the product's id.

<p>True</p> Signup and view all the answers

The Admin Categories route is the same as the path '/categories/admin'.

<p>False</p> Signup and view all the answers

The ProfileComponent will only render when the component's local state is updated.

<p>False</p> Signup and view all the answers

Study Notes

SE-3003: Web Engineering Final Exam

  • Exam scheduled for Wednesday, May 24, 2023
  • Exam duration: 3 hours
  • Total marks: 100

Instructions

  • Attempt all questions
  • Plan answers carefully
  • Write optimized, concise code
  • Ensure code works optimally
  • Use permanent ink pens
  • Verify the number of pages (18 including title page)
  • Question paper contains 3 questions

Question 1 (20 Marks)

  • Multiple choice questions (1 mark each)
  • Correct answers must be written in uppercase letters
  • Overwriting/cutting answers will not be marked

Question 2 (20 Marks)

  • 5 sub-questions
  • Each sub-question requires API calls for CRUD operations in ExpressJS
  • Data source to be used must be specified
  • Implement routes to retrieve all doctors, get specific doctor, add a new doctor, update existing doctor and delete a doctor
  • Examples of expected input and output are provided in the question paper.

Question 3 (60 Marks)

  • 3 sub-questions based on code snippets
  • Question 3(a) asks for console output upon component's first render
  • Question 3(b) asks for console output on button click
  • Question 3(c) asks what will be displayed on the web page upon button click
  • Question 3(2) asks for the output of a given code snippet
  • Question 3(3) requires completion of a missing code snippet
  • Question 3(4) focuses on retrieving messages from an API
  • Question 3(5) discusses updating code to fetch messages in one second
  • Question 3(6a) asks for completing a React code for Parent component
  • Question 3(6b) asks for issues with the approach and avoiding them
  • Question 3(6c) asks to implement React's prescribed approach to pass props

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

Description

Prepare for the SE-3003 Web Engineering final exam scheduled for May 24, 2023. The exam consists of multiple-choice questions and coding tasks involving CRUD operations in ExpressJS. Be sure to review the optimal coding practices and API implementation as outlined in the exam instructions.

More Like This

Lec 5 - ExpressJS
40 questions

Lec 5 - ExpressJS

ImaginativeHedgehog avatar
ImaginativeHedgehog
Express Routing and Performance Quiz
17 questions
 Framework Express de Node.js
12 questions
Preguntas sobre Node.js y Express
16 questions
Use Quizgecko on...
Browser
Browser