Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answers for Take Home Test #272

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion html-css/WhatWouldYouChange/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
* The content itself

Bonus point for the correct use of the word "semantic" in an answer.

+ bold might benefit from a span tag to not conflict with CSS
+ ID is caps
+ indentation is not clear - what elements contain other elements
+ <br> might benefit from a list
+ <p> might actually be a <ul>
+ <p> closing tag bad
+ redSection not very descriptive id
+ might benefit from some classes
+ information might need to be contained in a form
+ paragraphs are for reading not for listing
-->

<div ID=redSection>
Expand All @@ -29,4 +40,4 @@
</div>

</body>
</html>
</html>
12 changes: 6 additions & 6 deletions java/src/main/java/com/elsevier/education/Exercise1.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
TODO: Make this class immutable.

*/
public class Exercise1 {
public final class Exercise1 {

public static class Person {

private Set<String> phoneNumbers;
private String firstName;
private String lastName;

public Person() {
}

Expand All @@ -24,19 +24,19 @@ public Set<String> getPhoneNumbers() {
public void setPhoneNumbers(Set<String> newPhoneNumbers) {
phoneNumbers = newPhoneNumbers;
}

public String getFirstName() {
return firstName;
}
public void setFirstName(String newName) {
firstName = newName;
}

public String getLastName() {
return lastName;
}
public void setLastName(String newName) {
lastName = newName;
}
}
}
}
16 changes: 8 additions & 8 deletions java/src/main/java/com/elsevier/education/Exercise4.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
public class Exercise4 {

public static class Counter {

private int count = 0;
public int increment() {

public synchronized int increment() {
return ++count;
}
public int getCount() {

public synchronized int getCount() {
return count;
}
public void resetCount() {

public synchronized void resetCount() {
count = 0;
}

}
}
}
13 changes: 12 additions & 1 deletion javascript/WhatWouldYouChange/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
This code appears to work. Nonetheless note up to 10 things that look bad to you, including a brief note as to why.

Please consider both minor syntactical issues with the code as it stands, and how the code is structured overall.

+ ES6 should be used
+ if else statement is hard to read with too many line breaks
+ reqFlds variable is defined in two different ways - more consistancy is better
+ return false should be on the same line
+ conditional statements should have no line break
+ return statement could just change the submitButtonActive variable
+ reqFlds seems to not be declared properly
+ might need document ready for loading purposes
+ inconsistant semicolons
+ console logging a string and the funciton?
*/

var submitButtonActive = false
Expand Down Expand Up @@ -51,4 +62,4 @@
<p><input id="submitButton" type="submit" value="submit" /></p>

</body>
</html>
</html>