How does Agile differ from traditional waterfall development methodologies?
- Fixed requirements
- Iterative and incremental
- Linear and sequential
- Testing at the end
Agile development is iterative and incremental, allowing for flexibility and adaptation throughout the project. In contrast, waterfall methodologies follow a linear and sequential process with fixed requirements and typically conduct testing at the end of the development cycle. This key difference results in Agile being more responsive to change and customer feedback.
Which encryption algorithm is commonly used for securing web traffic over HTTPS?
- AES (Advanced Encryption Standard)
- MD5 (Message Digest Algorithm 5)
- RSA (Rivest-Shamir-Adleman)
- SHA (Secure Hash Algorithm)
The encryption algorithm commonly used for securing web traffic over HTTPS is AES (Advanced Encryption Standard). AES is a symmetric encryption algorithm that ensures secure communication by encrypting data transmitted between a web server and a client browser, thus protecting sensitive information from unauthorized access during transmission.
The process of converting a class instance into a stream of bytes for storage or transmission is called ___________.
- Serialization
- Encapsulation
- Abstraction
- Polymorphism
The correct option is Serialization. Serialization is the process of converting an object into a format that can be easily stored or transmitted and later reconstructed back into its original state.
You're tasked with optimizing the storage allocation in a database system. How could dynamic programming be utilized to achieve this goal effectively?
- Apply a random allocation strategy to allocate storage space based on immediate availability without considering data access patterns.
- Apply dynamic programming to analyze the data access patterns and prioritize the storage allocation based on the frequency and importance of data accesses.
- Implement a static allocation strategy that assigns fixed storage space to each data entity in the database system.
- Use a round-robin allocation approach to evenly distribute storage space among all data entities in the database system.
Dynamic programming can optimize storage allocation by analyzing data access patterns, determining the frequency and importance of data accesses, and then allocating storage accordingly. This approach ensures that frequently accessed data is stored optimally to minimize access times and improve overall system performance.
In a banking application, you're tasked with designing classes for different account types such as savings, checking, and credit. How would you ensure proper encapsulation and abstraction in your design?
- Use interfaces to define common operations for different account types, promoting code consistency and flexibility.
- Use encapsulation to hide account details such as balance and transaction history, exposing only necessary methods.
- Use inheritance to create a base Account class and derive specific account type classes with shared functionalities.
- Use abstraction to define abstract classes for account types with common properties and methods, then implement specific classes.
Option 4 discusses how abstraction can ensure proper encapsulation by defining abstract classes for account types with common properties and methods, while specific account classes implement these abstract structures. This approach hides internal complexities, such as balance handling and transaction history, within the classes, maintaining data integrity and security. Encapsulation, combined with abstraction, leads to a well-structured and maintainable design in a banking application.
In an AVL tree, the balance factor of a node is defined as the height difference between its _________ and _________ subtrees.
- Left
- Right
- Left and Right
- Child
The balance factor in an AVL (Adelson-Velsky and Landis) tree is calculated by subtracting the height of the right subtree from the height of the left subtree or vice versa, depending on the implementation. This difference determines whether the tree needs rebalancing to maintain its AVL properties. The other options do not accurately describe how the balance factor is calculated in an AVL tree.
In Node.js, ___________ is used to manage dependencies for a project.
- Gradle
- Maven
- npm
- pip
npm is the package manager for Node.js, allowing developers to easily install, update, and manage dependencies for their projects. It is widely used within the Node.js ecosystem for package management.
The ___________ algorithm is used to find the shortest paths between nodes in a weighted graph.
- Dijkstra's Algorithm
- Bellman-Ford Algorithm
- Kruskal's Algorithm
- Depth-First Search
Dijkstra's algorithm is a popular method for finding the shortest path between nodes in a weighted graph by iteratively selecting the vertex with the smallest distance from the source vertex until all vertices have been visited. The other options, such as Bellman-Ford, Kruskal's algorithm, and depth-first search, are not primarily used for finding shortest paths in this context.
You're tasked with creating a responsive website that adapts to different screen sizes. How would you use CSS media queries to achieve this?
- Apply inline styles to elements based on screen size.
- Define breakpoints for various screen sizes and apply specific styles using media queries.
- Use JavaScript to detect screen sizes and apply different CSS styles accordingly.
- Use a CSS framework to handle responsive design automatically.
CSS media queries are used to apply different CSS styles based on the characteristics of the device or browser, such as screen width, height, orientation, etc. The correct approach is to define breakpoints where the layout needs to change, such as for small, medium, and large screens. By applying specific styles using media queries for each breakpoint, you ensure that the website adapts appropriately to different screen sizes, providing an optimal user experience across devices.
The ___________ file in Node.js contains configuration settings for a Node.js application.
- app.js
- config.js
- package.json
- settings.json
The package.json file in a Node.js application contains important metadata and configuration settings, including dependencies, scripts, version information, and other project-specific details.