Interview QC Questions Part 1 Flashcards

1
Q

What is a terminal?

A

A Terminal is a CLI (Command Line Interface) to interact with programs in the computer.

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

What is Git Bash?

A

Git Bash is an application for Microsoft Windows environments which provides an emulation layer for a Git command line experience.

Alternative explanation:
Git Bash is a command line interface application that mimics Unix style commands to provide a git command line experience.

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

What is an operating system?

A

An operating system is system software that manages computer hardware, software resources, and provides common services for computer programs.

Alternative explanation 1:
An operating system is a program that intermediates between a user and the computer hardware.

Alternative explanation 2:
An operating system interfaces with the application software and BIOS in order to allow applications to interact with computer hardware.

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

What does BIOS stand for? What is it?

A

Basic Input/Output System

It is the program a computer’s microprocessor uses to start the computer system after it is powered on.

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

How do I list all the contents in my current directory? hidden files?

A

using the list all command: ls -a

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

How do I change to a subdirectory?

A

To change to a subdirectory type cd (change directory) followed by a space and the name of the subdirectory. Example:

cd Documents

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

How do you change to a parent directory?

A

To change to a parent directory type cd (change directory) followed by a space and two periods. Example:

cd ..

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

How do I make a new directory? a new file?

A

To make a new directory you use the mkdir command.

To make a new file you use the echo command, for example:
echo your_text_here > filename.extension

The copy con command can also be used as followed:
copy con filename_with_extension, like the bellow example:
copy con MyFile.txt

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

What is nano?

A

Nano is a simple terminal-based text editor. An alternative to Nano is Vim, or Emacs.

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

What is git? GitHub?

A

Git is a version control system that lets you manage and keep track of your source code history.

GitHub is a cloud-based hosting service that lets you manage Git repositories.

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

Steps to upload my code to github-

A

The following steps are how one could upload code to github:

  1. Install Git.
  2. Create a new github repository by providing a repository name, description (optional), and other parameters.
  3. On the local machine, change to the directory where the source code is located.
  4. Create a new repository in this directory using git init.
  5. Add the files to the repository using git add ‘filename’, or git add . (note the period allows one to add all files to the repository rather than a single file).
  6. Commit the changes so that git can track them using git commit -m “message”. the -m command lets you include a message to the commit.
  7. Push the changes to the hosted repository on github by telling git to add a remote location. This is done using the remote add command as followed: git remote add origin “https://github.com/yourusername/your-repo-name.git”

Once the steps are complete Git will know about the remote repository and the following push command can be used to simplify the process: git push -u origin master

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

What is Java?

A

Java is a high-level, class-based, object-oriented programming language that is designed to have as few implementation dependencies as possible.

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

What is the JDK, JRE, and JVM?

A

JDK, Java Development Kit, is a software development kit.

JRE, Java Runtime Environment, is a software bundle that allows Java programs to run.

JVM, Java Virtual Machine, is an environment for executing bytecode. The JVM is what allows Java programs to run on any system.

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

What are some primitive data types

A

byte , short , int , long , float , double , boolean and char.

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

What is a class? An object?

A

A class is a user-defined type that describes what a certain type of object will look like. Example:

public class NameOfClass {

int x = 4;

}

An object is a single instance of a class. Example:

public class NameOfClass ( ) { // This is the class

int x = 4; // This is a variable

 public static void main(String[ ] args) { // This is the main method

       ClassObejct obj = new ClassObject( ); // This is an object

       System.out.print(obj.x); // This outputs / prints the object
 } }
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a method?

A

A method in Java or Java Method is a collection of statements that perform some specific task and return the result to the caller.

Methods will have the following structure:

modifier return-type method-name (parameter-list) {

body of the method

}

Example:

public int maxMint (int x, int y) {
if (x > y)
return x;
else
return y;
}

17
Q

What is a variable?

A

Variable in Java is a data container that saves the data values during Java program execution. Example:

datatype variable_name = value;

int age = 20;

18
Q

What is a stack trace?

A

A stack trace is a report that provides information about program subroutines. It is commonly used for certain kinds of debugging, where a stack trace can help software engineers figure out where a problem lies or how various subroutines work together during execution.

Alternative Explanation:

A Java stack trace is displayed when an error or exception occurs. The stack trace, also called a backtrace, consists of a collection of stack records, which store an application’s movement during its execution.

19
Q

What is a constructor?

A

A constructor in Java is a special method that is used to initialize objects. The constructor is called when an object of a class is created. Example:

// Create a Main class
public class Main {
int x; // Create a class attribute

// Create a class constructor for the Main class
public Main() {
x = 5; // Set the initial value for the class attribute x
}

public static void main(String[] args) {
Main myObj = new Main(); // Create an object of class Main (This will call the constructor)
System.out.println(myObj.x); // Print the value of x
}
}

// Outputs 5

20
Q

How do I take in input from the console (scanner) How to output to console?

A

You can take in input from the console using the Scanner and providing a variable type to input as followed:

Scanner in = new Scanner(System.in)
String s = in.nextLine( );

You can output to the console using system out print as followed:

System.out.println(“You entered string “ + s);

21
Q

Example of control flow statements?

A

An example of a control flow statement is:

if ( condition ) {
statement 1; //executes when condition is in use
}

Additional information:
Control flow statements are one of the fundamental features of Java, which provides a smooth flow of program.

Java provides three types of control flow statements.

Decision Making statements
   - if statements
   - switch statement

Loop statements
   - do while loop
   - while loop
   - for loop
   - for-each loop

Jump statements
   - break statement
   - continue statement
22
Q

What is a conditional statement? Operators we use with them?

A

Conditional statements define conditions that are true or false and then execute based on whether or not the condition is true.

Some operators used with conditional statements are:

and operator = &&
or operator = ||
ternary operator = ?:

23
Q

What is an array?

A

An array is a container object that holds a fixed number of values of a single type. All data in an array must be of the same data type.

24
Q

What is agile? Waterfall?

A

Agile software development is based on an incremental, iterative approach. Instead of in-depth planning at the beginning of the project, Agile methodologies are open to changing requirements over time and encourages constant feedback from the end users.

In Waterfall project management, projects are broken down into linear and sequential stages, where every piece of the project relies on the completion of preceding deliverables.

More in depth information on the various project management methodologies can be found in the following link:
https://www.smartsheet.com/agile-vs-scrum-vs-waterfall-vs-kanban

25
Q

What is a string?

A

A Java string is a sequence of characters that exists as an object of the class java. Once created, a string is immutable – its value cannot be changed.