CodeHS Software Development and App Development Accreditations 2 — Questions and Answers
Question 1: In CodeHS app development, which layout widget in Flutter arranges children in a horizontal line?
- Column
- Row (Correct answer)
- Stack
- Container
Correct answer: Row
The Row widget in Flutter places its children side-by-side horizontally.
Question 2: What does the term 'refactoring' mean in software development?
- Adding new features to code
- Restructuring existing code without changing its behavior (Correct answer)
- Deleting unused variables
- Converting code to a different language
Correct answer: Restructuring existing code without changing its behavior
Refactoring improves code structure, readability, or efficiency while keeping the same external behavior.
Question 3: Which version control command creates a new independent copy of a remote repository on your local machine?
- git pull
- git fork
- git clone (Correct answer)
- git fetch
Correct answer: git clone
git clone downloads a full copy of a remote repository to your local system.
Question 4: In object-oriented programming, what is 'encapsulation'?
- Inheriting methods from a parent class
- Bundling data and methods that operate on that data within one unit (Correct answer)
- Creating multiple objects from one class
- Overriding a method in a subclass
Correct answer: Bundling data and methods that operate on that data within one unit
Encapsulation hides internal state and groups related data and behavior inside a class.
Question 5: Which HTTP status code indicates a successful GET request?
- 201
- 404
- 500
- 200 (Correct answer)
Correct answer: 200
HTTP 200 OK means the request was received, understood, and processed successfully.
Question 6: In a mobile app, what is the purpose of a 'splash screen'?
- Displaying error messages to users
- Showing a branded loading screen while the app initializes (Correct answer)
- Confirming logout from the app
- Presenting user settings
Correct answer: Showing a branded loading screen while the app initializes
A splash screen is shown briefly while the app loads resources, providing visual branding.
Question 7: Which data structure follows the Last-In, First-Out (LIFO) principle?
- Queue
- Linked list
- Stack (Correct answer)
- Tree
Correct answer: Stack
A stack removes the most recently added element first, following LIFO order.
In CodeHS app development, which layout widget in Flutter arranges children in a horizontal line?