Podcast
Questions and Answers
The API route to retrieve all doctors' information is defined as POST /api/doctors.
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.
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.
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.
In the sample code provided, a specific doctor's information can be retrieved using the route GET /api/doctors/456.
Signup and view all the answers
The data structure for each doctor includes exactly 4 attributes: id, name, designation, and specialization.
The data structure for each doctor includes exactly 4 attributes: id, name, designation, and specialization.
Signup and view all the answers
The useEffect hook in ReactJS is used to handle user input in forms.
The useEffect hook in ReactJS is used to handle user input in forms.
Signup and view all the answers
The React Context API is primarily used for managing state in class components.
The React Context API is primarily used for managing state in class components.
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.
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.
Signup and view all the answers
Redux is primarily used to enable server-side rendering of React components.
Redux is primarily used to enable server-side rendering of React components.
Signup and view all the answers
The 'dispatch' function in Redux updates the store by applying the specified action.
The 'dispatch' function in Redux updates the store by applying the specified action.
Signup and view all the answers
BrowserRouter is the primary routing component used in React Routing v6.
BrowserRouter is the primary routing component used in React Routing v6.
Signup and view all the answers
The useHistory hook is used to navigate programmatically in React Routing v6.
The useHistory hook is used to navigate programmatically in React Routing v6.
Signup and view all the answers
It is a standard practice to store JWT Secrets in a JSON file.
It is a standard practice to store JWT Secrets in a JSON file.
Signup and view all the answers
The specialization of the doctor in the provided code is Pediatrics.
The specialization of the doctor in the provided code is Pediatrics.
Signup and view all the answers
The output on the console when the component is rendered for the first time includes 'Component rendered successfully'.
The output on the console when the component is rendered for the first time includes 'Component rendered successfully'.
Signup and view all the answers
The DELETE endpoint in the API returns a message stating 'Doctor deleted successfully.' when a doctor is deleted.
The DELETE endpoint in the API returns a message stating 'Doctor deleted successfully.' when a doctor is deleted.
Signup and view all the answers
The doctor is found in the system when a valid ID is provided to the PUT API endpoint.
The doctor is found in the system when a valid ID is provided to the PUT API endpoint.
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!'.
The output displayed on the web page when the button is clicked for the first time is 'I'm Not Ready!'.
Signup and view all the answers
The application uses a hook called useEffect which runs only when the component mounts.
The application uses a hook called useEffect which runs only when the component mounts.
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.
If a doctor with the given ID is not found in the database, the DELETE request will return a 200 status code.
Signup and view all the answers
In the given sample code, clicking the button calls the setReady function with false.
In the given sample code, clicking the button calls the setReady function with false.
Signup and view all the answers
The useEffect hook is called every time the component re-renders.
The useEffect hook is called every time the component re-renders.
Signup and view all the answers
SetTimeout is used to delay the execution of fetchMessages by one second.
SetTimeout is used to delay the execution of fetchMessages by one second.
Signup and view all the answers
The ChildC component directly receives props without any parent components passing them down.
The ChildC component directly receives props without any parent components passing them down.
Signup and view all the answers
Context API is useful for passing data without prop drilling in deeply nested components.
Context API is useful for passing data without prop drilling in deeply nested components.
Signup and view all the answers
The UserContext is created using the createContext method from React.
The UserContext is created using the createContext method from React.
Signup and view all the answers
SetMessages function updates the state directly without any arguments.
SetMessages function updates the state directly without any arguments.
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.
If user state in the Parent component is an empty array, ChildC will print 'Username is: ' with no value.
Signup and view all the answers
React Router is not applicable to a multi-level navigation structure in a React application.
React Router is not applicable to a multi-level navigation structure in a React application.
Signup and view all the answers
The output of the given function will display 'Item 1' and 'Item 2' on the screen.
The output of the given function will display 'Item 1' and 'Item 2' on the screen.
Signup and view all the answers
The code provided for PostList will show 'No posts available.' if there are no posts.
The code provided for PostList will show 'No posts available.' if there are no posts.
Signup and view all the answers
In the ChatWindow component, messages are fetched from the API each time the component is rendered.
In the ChatWindow component, messages are fetched from the API each time the component is rendered.
Signup and view all the answers
The PostList component correctly maps over posts using 'posts.title' and 'posts.body'.
The PostList component correctly maps over posts using 'posts.title' and 'posts.body'.
Signup and view all the answers
The return statement in the App function does not properly return any JSX because of missing parentheses.
The return statement in the App function does not properly return any JSX because of missing parentheses.
Signup and view all the answers
The fetchMessages function will log an error message to the console if the API call fails.
The fetchMessages function will log an error message to the console if the API call fails.
Signup and view all the answers
The mapping function used in the ChatWindow component correctly displays 'message.text'.
The mapping function used in the ChatWindow component correctly displays 'message.text'.
Signup and view all the answers
The given code guarantees that messages will be displayed as a list in the ChatWindow component.
The given code guarantees that messages will be displayed as a list in the ChatWindow component.
Signup and view all the answers
The Admin Dashboard route is identified by the path '/admin/home'.
The Admin Dashboard route is identified by the path '/admin/home'.
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.
The Redux slice named 'posts' in the given code has an initial state containing an empty array for posts.
Signup and view all the answers
In the ProfileComponent, the useEffect dependency array includes the 'posts' variable.
In the ProfileComponent, the useEffect dependency array includes the 'posts' variable.
Signup and view all the answers
The fetch_posts action immediately updates the state with the fetched posts data.
The fetch_posts action immediately updates the state with the fetched posts data.
Signup and view all the answers
The configureStore function is imported from '@redux/react'.
The configureStore function is imported from '@redux/react'.
Signup and view all the answers
The path '/products/:id' allows access to specific product details based on the product's id.
The path '/products/:id' allows access to specific product details based on the product's id.
Signup and view all the answers
The Admin Categories route is the same as the path '/categories/admin'.
The Admin Categories route is the same as the path '/categories/admin'.
Signup and view all the answers
The ProfileComponent will only render when the component's local state is updated.
The ProfileComponent will only render when the component's local state is updated.
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.
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.