Skip to content

Commit

Permalink
Add several questions to OOP, Swift, Maven, and fix some conflicts (E…
Browse files Browse the repository at this point in the history
…bazhanov#1480)

* Add OOP question about the open/closed principle

* Add OOP question about why to override a base class method

* Fix Swift question numbers due to broken duplicate of Q13

* Move Swift Q31 and Q50 closer together to highlight conflict

* Remove Swift Q24 due to inconsistent answers based on Q30

* Update Swift Q70 to include an alternative question

* Move Swift Q47 and Q66 closer together to highlight conflict

* Update Swift to consolidate Q35, Q46, and Q68 with answers

* Add Swift question about nullable String variable declaration

* Add Swift question about multiplication of Int and Double

* Add Maven question about the default location of settings.xml

* Add Maven question about how to save bandwidth in big corporate

* Add Maven question about the length of child POM inheritance

* Add Maven question about Checkstyle Plugin and broken links

* Add Maven question about which plugin to build a fat JAR file
  • Loading branch information
cixtor authored Apr 21, 2021
1 parent e60babf commit c1d504e
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 90 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if you want to meet each other or discuss quiz related problems join the `Discor
| [Linux](linux/linux-assesment.md) | | => 34 questions | => 30 answers | [@D4RIO](https://github.com/D4RIO) |
| [Machine Learning](machine-learning/machine-learning-quiz.md) | | => 70 questions | => 70 answers | [@aaronwangj](https://github.com/aaronwangj) |
| [MATLAB](matlab/matlab-quiz.md) | | => 45 questions | => 45 answers | |
| [Maven](maven/maven-quiz.md) :fire: | | => 35 questions | => 35 answers | |
| [Maven](maven/maven-quiz.md) :fire: | | => 44 questions | => 44 answers | |
| [Microsoft Access](microsoft-access/microsoft-access.md) | | => 26 questions | => 0 answers | |
| [Microsoft Azure](microsoft-azure/microsoft-azure-quiz.md) | | => 44 questions | => 45 answers | |
| [Microsoft Excel](microsoft-excel/microsoft-excel-quiz.md) | <kbd>[<img title="Deutsch" alt="Deutsch" src="https://cdn.staticaly.com/gh/hjnilsson/country-flags/master/svg/de.svg" width="22">](microsoft-excel/microsoft-excel-quiz-de.md)</kbd> | => 52 questions | => 52 answers | |
Expand All @@ -59,7 +59,7 @@ if you want to meet each other or discuss quiz related problems join the `Discor
| [node.js](node.js/node.js-quiz.md) | | => 41 questions | => 41 answers | [@harman052](https://github.com/harman052) |
| [NoSQL](nosql/nosql-quiz.md) | | => 43 questions | => 43 answers | |
| [objective-c](objective-c/objective-c-quiz.md) | | => 33 questions | => 31 answers | |
| [OOP](oop/object-oriented-programming-quiz.md) | | => 51 questions | => 51 answers | |
| [OOP](oop/object-oriented-programming-quiz.md) | | => 56 questions | => 56 answers | |
| [PHP](php/php-quiz.md) | | => 34 questions | => 34 answers | |
| [Python](python/python-quiz.md) | | => 67 questions | => 67 answers | [@tik9](https://github.com/tik9) |
| [QuickBooks](quickbooks/quickbooks-quiz.md) | | => 46 questions | => 0 answers | |
Expand All @@ -71,7 +71,7 @@ if you want to meet each other or discuss quiz related problems join the `Discor
| [Search Engine Optimization (SEO)](seo/search-engine-optimization-quiz.md) | | => 29 questions | => 28 answers | |
| [SharePoint](sharepoint/sharepoint-quiz.md) | | => 29 questions | => 29 answers | |
| [Spring Framework](spring-framework/spring-framework-quiz.md) | | => 15 questions | => 15 answers | [@sumanas27](https://github.com/sumanas27), [@rradfar](https://github.com/rradfar) |
| [Swift](swift/swift-quiz.md) | | => 48 questions | => 48 answers | |
| [Swift](swift/swift-quiz.md) | | => 70 questions | => 70 answers | |
| [Transact-SQL (T-SQL)](t-sql/t-sql-quiz.md) | | => 28 questions | => 28 answers | |
| [Visual Basic for Applications (VBA)](vba/vba-quiz.md) | | => 11 questions | => 0 answers | |
| [Visio](visio/visio-quiz.md) | | => 32 questions | => 0 answers | |
Expand Down
33 changes: 33 additions & 0 deletions maven/maven-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,3 +256,36 @@ mvn install
- [ ] dependencies
- [ ] version
- [ ] groupId

#### Q40. The settings.xml file that provides the user-specific settings for Maven is contained in which directory by default?
- [ ] `${maven.home}/${user.name}/settings.xml`
- [x] `${user.home}/.m2/settings.xml`
- [ ] `${maven.home}/conf/settings.xml`
- [ ] `${user.home}/maven/settings.xml`

#### Q41. Suppose you are using Maven in a corporate environment and, to save bandwidth, you want to prevent the need for large numbers of developers to download the same dependency from the internet. What do you do to limit this?
- [x] Create an internal corporate repository to store copies of the necessary artifacts.
- [ ] It is not possible to do this.
- [ ] When defining the dependency, set the scope to provided.
- [ ] Each developer should define the dependency in the POM file in the local copy of the project.

#### Q42. In multimodule projects, what do child POMs inherit from the parent POM?
- [x] all of these answers
- [ ] dependencies
- [ ] groupId
- [ ] version

#### Q43. Below is a report generated for a multimodule project with the Checkstyle Plugin. Why might the highlighted links to the two child projects _not_ work?

![q43](q43.png)

- [ ] The Checkstyle Plugin does not work on child modules.
- [ ] Each Checkstyle report is in the target/site folder of the respective module.
- [ ] All links in Checkstyle reports must be specified in the plugin definition.
- [ ] Checkstyle reports for child modules have to be behind a firewall.

#### Q44. Which build plugin allows you to create a "fat" JAR file that contains all of the dependencies in the final JAR file?
- [ ] Fatjar
- [x] Shade
- [ ] Dependency
- [ ] Package
Binary file added maven/q43.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions oop/object-oriented-programming-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,17 @@
- [x] Attributes describ a state; behaviours describe a change.
- [ ] Attributes apply only to a specified object; behaviour apply to other linked objects.
- [ ] Behaviours are vector quantities; attributes are scalars.

#### Q55. The open/closed principle states that classes should be open for ___ but closed for ____.

- [ ] refactoring; duplication
- [ ] modification; duplication
- [x] extension; modification
- [ ] reuse; encapsulation

#### Q56. Why would you override a method of a base class?

- [ ] to define a method that must be implemented in a derived class
- [x] to define a custom implementation of an inherited member
- [ ] to define a method that must be implemented in a superclass only
- [ ] to define a class that can be inherited from
Loading

0 comments on commit c1d504e

Please sign in to comment.