Home Depot Interview Questions Flashcards

1
Q

What is Agile Development?

A

Agile software development is a group of software development methods in which requirements and solutions evolve through collaboration between self-organizing, cross-functional teams. It promotes adaptive planning, evolutionary development, early delivery, continuous improvement, and encourages rapid and flexible response to change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 12 Agile Principles?

A
  1. ) Customer satisfaction by rapid delivery of useful software
  2. ) Welcome changing requirements, even late in development
  3. ) Working software is delivered frequently (weeks rather than months)
  4. ) Close, daily cooperation between business people and developers
  5. ) Projects are built around motivated individuals, who should be trusted
  6. ) Face-to-face conversation is the best form of communication (co-location)
  7. ) Working software is the principal measure of progress
  8. ) Sustainable development, able to maintain a constant pace
  9. ) Continuous attention to technical excellence and good design
  10. ) Simplicity—the art of maximizing the amount of work not done—is essential
  11. ) Self-organizing teams
  12. ) Regular adaptation to changing circumstance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is SCRUM?

A

Scrum is a management framework for incremental product development using one or more cross-functional, self-organizing teams of about seven people each. Scrum has only three roles: Product Owner, Team, and Scrum Master.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an alternative to Waterfall development?

A

Scrum’s incremental, iterative approach trades the traditional phases of “waterfall” development for the ability to develop a subset of high-value features first, incorporating feedback sooner.

Waterfall

Requirements Analysis

Desgin

Code

Integration

Test

Deploy

SCRUM Incremental

(See images in dropbox)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Static Variable?

A

A static variable is one that’s associated with a class, not objects of that class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some Sorting Algorithms in JAVA?

A

bubble sort
selection sort
insertion sort
quick sort
merge sort

http://www.java2novice.com/java-sorting-algorithms/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain Bubble Sort

A

Bubble sort, also referred to as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order.

Worst Case time complexity: O(n^2)

Best Case time complexity: O(n)

(See image in dropbox)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain Selection Sort

A

The selection sort is a combination of searching and sorting. During each pass, the unsorted element with the smallest (or largest) value is moved to its proper position in the array. The number of times the sort passes through the array is one less than the number of items in the array. In the selection sort, the inner loop finds the next smallest (or largest) value and the outer loop places that value into its proper location.

Time Complexity: O(n^2)

(See image in dropbox)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain Insertion Sort

A

Insertion sort is a simple sorting algorithm, it builds the final sorted array one item at a time. It is much less efficient on large lists than other sort algorithms.

Advantages of Insertion Sort:

1) It is very simple.
2) It is very efficient for small data sets.
3) It is stable; i.e., it does not change the relative order of elements with equal keys.
4) In-place; i.e., only requires a constant amount O(1) of additional memory space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain Quick Sort

A

Quicksort or partition-exchange sort, is a fast sorting algorithm, which is using divide and conquer algorithm. Quicksort first divides a large list into two smaller sub-lists: the low elements and the high elements. Quicksort can then recursively sort the sub-lists.

Time complexity: O(n log(n))

(See image in dropbox)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Explain Merge Sort

A

Merge sort is a divide and conquer algorithm.

Steps to implement Merge Sort:

1) Divide the unsorted array into n partitions, each partition contains 1 element. Here the one element is considered as sorted.
2) Repeatedly merge partitioned units to produce new sublists until there is only 1 sublist remaining. This will be the sorted list at the end.

Time complexity: O(n*log(n))

(See image in dropbox)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Object Oriented Programming?

A

Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which are data structures that contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Give an example of Object Oriented Programming

A

Base class - Aninmals

Lion class extends Aninmals Class

Cat class extends Aninmals Class

public class Animal {
    public void sleep() {
         System.out.println(”Sleeping: Zzzzz”);
     }
     public void makeNoise() {
         System.out.println(”Noises...”);
       }
      public void roam() {
          System.out.println(”Roamin’ on the plain.”);
       }
}
-----------------------------------------------------------

Lion IS-A Animal
Override the makeNoise() method.

public class Lion extends Animal {
       public void makeNoise() {
       System.out.println(”Roaring: Rrrrrr!”);
  } }

Cat IS-A Animal

Override the makeNoise() method

Public Class Cat extends Animal{

   Public void makeNoise(){

        System.out.println(”Miaowing Miaooooo”);

  }

}

The Launcher

public class AnimalLauncher {

public static void main(String[] args) {

System.out.println(”\Lion\n=====”);

Lion lion = new Lion();

Lion.makeNoise(); //from lion

lion. roam(); //from lion
lion. sleep(); //from lion

System.out.println(”\Cat\n=====”);

Cat cat = new Cat();

cat. makeNoise(); //from cat
lecato. roam(); //from cat
cat. sleep(); //from cat

}

}

Output

Lion

=====

Roaring: Rrrrrrr!

Roaming: I’m with my pack.

Sleeping: Zzzzz

Cat

=====

Roaring: Miaooo!

Roaming: I’m roaming alone.

Sleeping: Zzzzz

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the four fundamental concepts of object oriented programming?

A

Encapsulation, Data Abstraction, Polymorphism, Inheritence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is Polymorphism?

A

Means having many forms. One interface, multiple functions.

Another way objects work together is to define methods that take other objects as parameters.

Example:

Class PrintData{

  public Static void print(int i){

   Console.Writeline("Printing int:{0}",i);

  }

  Static void print(double F){}

  Static void print(string S){}

  Static void main(string[] args){

     Printdata p = new printdata();

    p. print(5);
    p. print(500.263);
    p. print("hello c++");

}

  1. class Bike{
  2. void run(){System.out.println(“running”);}
  3. }
  4. class Splender extends Bike{
  5. void run(){System.out.println(“running safely with 60km”);}
  6. public static void main(String args[]){
  7. Bike b = new Splender();//upcasting
  8. b.run();
  9. }
  10. }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Inheritance?

A

a way of obtaining code without writing it. In particular, subclass can inheirt the implementations of its super class’s methods.

Example:

public class Animal { public Animal() { System.out.println("A new animal has been created!"); } public void sleep() { System.out.println("An animal sleeps..."); } public void eat() { System.out.println("An animal eats..."); } }
public class Bird extends Animal { public Bird() { super(); System.out.println("A new bird has been created!"); } @Override public void sleep() { System.out.println("A bird sleeps..."); } @Override public void eat() { System.out.println("A bird eats..."); } }
public class Dog extends Animal { public Dog() { super(); System.out.println("A new dog has been created!"); } @Override public void sleep() { System.out.println("A dog sleeps..."); } @Override public void eat() { System.out.println("A dog eats..."); } }
public class MainClass { public static void main(String[] args) { Animal animal = new Animal(); Bird bird = new Bird(); Dog dog = new Dog(); System.out.println(); animal.sleep(); animal.eat(); bird.sleep(); bird.eat(); dog.sleep(); dog.eat(); } }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is encapsulation?

A

Encapsulation is the hiding of implementation details so that they are inaccessible outside of the module providing the implementation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is Data Abstraction?

A

Data Abstraction is the reduction of a particular body of data to a simplified representation of the whole.

In other words, Abstraction is the process of hiding the implmentation details and showing only the functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What are the four kinds of Abstraction?

A
  • procedural abstraction
  • data abstraction
  • iteration abstraction
  • type hierarchy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is Procedural Abstraction?

A

Procedural abstraction is a particular mechanism for separating use from implementation.

The idea, that each conceptual unit of behavior should be wrapped up in a procedure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the difference between Java and C#?

A

Other then some small syntax differences for example Console.write vs System.out.println, Java does not have delegates.

Example:

public delegate void printString(string s); ... printString ps1 = new printString(WriteToScreen); printString ps2 = new printString(WriteToFile);

Delegates are used to pass methods as arguments to other methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is big O notation?

A

Big O notation is the language we use for articulating how long an algorithm takes to run. It’s how we compare the efficiency of different approaches to a problem. With big O notation we express the runtime in terms of—brace yourself—how quickly it grows relative to the input, as the input gets arbitrarily large.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What is the synchronization() method in java and give a situation in which it would be used?

A

Threads communicate primarily by sharing access to fields and the objects reference fields refer to. This form of communication is extremely efficient, but makes two kinds of errors possible: thread interference and memory consistency errors. The tool needed to prevent these errors is synchronization.

Example:

An ATM machine with two threads trying to access a share variable “Checking_Account”, thread 1 named deposit and thread 2 named withdraw. Both excute and try to access the shared variable “Checking _Account”, with using the synchronization method we can make sure thread 1 and thread 2 do not block each other.

public synchronized void Deposit

public synchronized void Withdraw

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Define software desgin pattern.

A

Software desgin pattern is a general reusable solution to a commonly occurring problem within a given context in software design. A design pattern is not a finished design that can be transformed directly into source or machine code. It is a description or template for how to solve a problem that can be used in many different situations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

What are 5 software desgin patterns and explain each one.

A
  • Algorithm strategy patterns addressing concerns related to high-level strategies describing how to exploit application characteristics on a computing platform.
  • Computational design patterns addressing concerns related to key computation identification.
  • Execution patterns that address concerns related to supporting application execution, including strategies in executing streams of tasks and building blocks to support task synchronization.
  • Implementation strategy patterns addressing concerns related to implementing source code to support
    1. program organization, and
    2. the common data structures specific to parallel programming.
  • Structural design patterns addressing concerns related to high-level structures of applications being developed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Why would one choose to use a DB2 database vs. an oracle database?

A

Biggest reason DB2 database can cost less then an Oracle database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What are the differences between Java 5, 6, 7, 8?

A

Java 8 (a.k.a 1.8)

<a>JSR 337</a>, <a>what’s new</a>

Language changes:

  • lambda expressions (JSR 335, includes method handles)
  • continuation of Project Coin (small language improvements)
  • annotations on Java types

Library changes:

Java 7 (a.k.a 1.7)

<a>JSR 336</a>, <a>features and enhancements</a>

Language changes:

Library changes:

Platform changes:

Java 6 (a.k.a 1.6)

<a>JSR 270</a>. <a>features and enhancements</a>

Mostly incremental improvements to existing libraries, no new language features (except for the @Override snafu).

Java 5 (a.k.a 1.5)

<a>JSR 176</a>, <a>features and enhancements</a>

Language Changes:

  • generics (that’s the big one)
  • annotations
  • enum types
  • varargs, enhanced for loops (for-each)

Library changes:

  • concurrency utilities in java.util.concurrent
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Identify 10 different Java APIs and explain what each is used for

A

Java Advanced Imaging JAI A set of interfaces that support a high-level programming model allowing to manipulate images easily. Java Data Objects JDO A specification of Java object persistence. JavaHelp A full-featured, extensible help system that enables you to incorporate online help in applets, components, applications, operating systems, and devices. Java Media Framework JMF An API that enables audio, video and other time-based media to be added to Java applications and applets. Java Naming and Directory Interface JNDI An API for directory services. Java Persistence API JPA A specification for object-relational mapping. JSR 338Java Speech API JSAPI This API allows for speech synthesis and speech recognition. Java 3D J3D A scene graph-based 3D API. available hereJava OpenGL JOGL A wrapper library for OpenGL. available here Java USB for Windows (none) A USB communication of Java applications

29
Q

What is the difference between DOM and SAX?

A

1) DOM parser loads whole xml document in memory while SAX only loads small part of XML file in memory.
2) DOM parser is faster than SAX because it access whole XML document in memory.

30
Q

Explain what is defined in the .jar, .ear, and .web files for a J2EE application?

A

> In J2EE application modules are packaged as EAR, JAR and WAR based on their functionalityJAR: EJB modules which contains enterprise java beans class files and EJB deployment descriptor are packed as JAR files with .jar extenstionWAR: Web modules which contains Servlet class files,JSP FIles,supporting files, GIF and HTML files are packaged as JAR file with .war (web archive) extensionEAR: All above files (.jar and .war) are packaged as JAR file with .ear (enterprise archive) extension and deployed into Application Server.

31
Q

What will happen if you do not use hashcode() to override a equals()?

A

If you don’t override hashcode() then the default implementation in Object class will be used by collections.

32
Q

What is transient variable?

A

The transient keyword in Java is used to indicate that a field should not be serialized.

33
Q

Explain the different types of EJBs

A

Enterprise Bean Type

Purpose

Session

Performs a task for a client; optionally, may implement a web service

Message-driven

Acts as a listener for a particular messaging type, such as the Java Message Service API

34
Q

What is a Singleton in java?

A

The singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system.

The Singleton design pattern addresses all of these concerns. With the Singleton design pattern you can:

  • Ensure that only one instance of a class is created
  • Provide a global point of access to the object
  • Allow multiple instances in the future without affecting a singleton class’s clients
35
Q

Explain the use of web application frameworks in java development

A

Well, coding good-looking web applications in Java isn’t super easy. In fact, let’s just say it sucks. It can be hard to do and mostly doesn’t give us the rich front-end we strive to deliver to happy users. This is really the catalyst which has caused Web Frameworks to be created. Both, functional and non-functional web app requirements have led to the need for various web frameworks to be created.

36
Q

What is Struts in java?

A

Struts is the most popular framework for developing Java based web applications. Struts is being developed as an open source project started by Apache Software Foundation . Struts framework is based on Model View Controller (MVC) architecture.

37
Q

What is Spring in java?

A

Spring Framework. The Spring Framework is an open source application framework and inversion of control container for the Java platform. The framework’s core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform.

38
Q

What is Use Case?

A

Is a written description of how users will perform a task.

39
Q

What are Relational Databases?

A

A database that presents data in tables with rows and columns.

40
Q

What is Method overriding?

A

Method can be redefined in the derived class.

Example:

class Animal{ public void move(){ System.out.println("Animals can move"); } } class Dog extends Animal{ public void move(){ System.out.println("Dogs can walk and run"); } } public class TestDog{ public static void main(String args[]){ Animal a = new Animal(); // Animal reference and object Animal b = new Dog(); // Animal reference but Dog object a.move();// runs the method in Animal class b.move();//Runs the method in Dog class } }
41
Q

What is Method overloading?

A

Method Overloading is a feature that allows a class to have two or more methods having same name, if their argument lists are different.

42
Q

What is an Object?

A

An object is an instance of a class.

43
Q

What is a class?

A

A class is a blue print from which individual objects are created.

44
Q

What is intergration testing?

A

Intergration testing is testing a group of modules together.

45
Q

What is Glass box testing?

A

Glass box - testing based on the program text.

46
Q

What is Acceptance Testing?

A

Acceptance testing is a test conducted to determine if the requirements of a specification or contract are met.

47
Q

What is Black box testing?

A

Black box testing is a method of software testing that examines the functionality of an application without peering into its internal structures or workings.

48
Q

What is an Abstract Class?

A

An abstract class is a class that can’t be instantiated. It’s only purpose is for other classes to extend.

49
Q

What is an Abstract Method?

A

Abstract methods are methods in an abstract class (have to be declared abstract) which means the extending concrete class must override them as they have no body.

50
Q

What is Abstraction by Parameterization?

A
51
Q

What is Abstraction by specification?

A

Abstraction by specification is the process of abstracting from how a program module is implemented to what the module does.

52
Q

What is Decomposition?

A

•Create small programs that interact with one another in simple, well-defined ways, to reduce complexity

53
Q

Whats is iteration abstraction?

A

Allow to iterate over all the elements of a collection

Avoid having to say more than is relevant about the flow of control in a loop
- i.e. implementation details are protected

54
Q

What is type hierarchy?

A

Type families, supertype and subtype
•Commonalities in supertypes and differences in subtypes
•E.g. JCF (Java Collection Framework), input
stream

55
Q

What is Coherence?

A

Coherence is a property of abstraction; an abstraction is Coherent if its specification indicates that it has a single well-defined purpose.

56
Q

What is Bottom up development?

A

Bottom up development is a development process in which all modules used by module M are implemented and tested before M is implemented.

57
Q

What is a Concrete Class?

A

A concrete class can have direct instances were an abstract class cannot. A concrete class is the class that has the implentaion of an interface.

58
Q

What is Mutability?

A

An Immutable object is a kind of object whose state cannot be modified after it is created. This is as opposed to a mutable object, which can be modified after it is created.

59
Q

What is a Mutator, Accessor?

A

A getter, “Accessor”, returns a class’s variable or its value. A setter, “Mutator”, sets a class’s variable or its value.

60
Q

What is the difference between an interface and abstract class?

A

A class must be declared abstract when it has one or more abstract methods. A method is declared abstract when it has a method heading, but no body – which means that an abstract method has no implementation code inside curly braces like normal methods do.

An interface differs from an abstract class because an interface is not a class. An interface is essentially a type that can be satisfied by any class that implements the interface.

Any class that implements an interface must satisfy 2 conditions:

  • It must have the phrase “implements Interface_Name” at the beginning of the class definiton.
  • It must implement all of the method headings listed in the interface definition.

This is what an interface called “Dog” would look like:

public interface Dog { public boolean Barks(); public boolean isGoldenRetriever(); }

Now, if a class were to implement this interface, this is what it would look like:

public class SomeClass implements Dog { public boolean Barks{ // method definition here } public boolean isGoldenRetriever{ // method definition here } }
61
Q

How do you find the intersection of two arrays?

A

Use a hash table.

foreach element e in array A
    insert e into hash table H

foreach element e in array B
    if H contains e 
        print e
62
Q

How do you reduce the load time of JavaScript files?

A

Minification (minimization), is the process of removing all unnecessary characters from source code without changing its functionality.

63
Q

What is a protected access modifier?

A

The type of member can be accessed only by code in the same class, or in a class that is derived from that class.

64
Q

What is the Z-index?

A

Z-index is a CSS property that sets the stack order of specific elements.

65
Q

What is Union SQL?

A

The UNION operator is used to combine the result-set of two or more SELECT statements.

Example:

SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;

66
Q

What is Join SQL?

A

An SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them.

OrderID CustomerID OrderDate 10308 2 1996-09-18 10309 37 1996-09-19 10310 77 1996-09-20

Then, have a look at a selection from the “Customers” table:

CustomerID CustomerName ContactName Country 1 Alfreds Futterkiste Maria Anders Germany 2 Ana Trujillo Emparedados y helados Ana Trujillo Mexico 3 Antonio Moreno Taquería Antonio Moreno Mexico

Notice that the “CustomerID” column in the “Orders” table refers to the “CustomerID” in the “Customers” table. The relationship between the two tables above is the “CustomerID” column.

Then, if we run the following SQL statement (that contains an INNER JOIN):

Example

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers
ON Orders.CustomerID=Customers.CustomerID;

it will produce something like this:

OrderID CustomerName OrderDate 10308 Ana Trujillo Emparedados y helados 9/18/1996 10365 Antonio Moreno Taquería 11/27/1996 10383 Around the Horn 12/16/1996 10355 Around the Horn 11/15/1996 10278 Berglunds snabbköp 8/12/1996

Different SQL JOINs

Before we continue with examples, we will list the types the different SQL JOINs you can use:

  • INNER JOIN: Returns all rows when there is at least one match in BOTH tables
  • LEFT JOIN: Return all rows from the left table, and the matched rows from the right table
  • RIGHT JOIN: Return all rows from the right table, and the matched rows from the left table
  • FULL JOIN: Return all rows when there is a match in ONE of the tables

« Previous

Next Chapter »

WEB HOSTING

WEB BUILDING

W3SCHOOLS EXAMS
HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

SHARE THIS PAGE

COLOR PICKER

67
Q

Questions to Ask during the phone interview?

A
  1. ) What are the opportunities for advancement?
  2. ) What does the work environment look like, open floor plan, cubes, offices?
68
Q

What was one of your last / toughest projects you have worked on? What problems did you come across and how did you resolve them?

A
69
Q

What is loose coupling and tight coupling?

A

Loose coupling is achieved by means of a design that promotes single-responsibility and separation of concerns.

Tight coupling is when a group of classes are highly dependent on one another.