Assessment Prep Flashcards

1
Q

What are the advantages of object oriented programming.

A

OOP allows for modular structure, clear program architecture and promotes code reusability.

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

Explain JDK JRE and JVM

A

JDK is the Java development kit and contains everything needed to build, compile and run Java programs. It includes compilers JRE, debuggers and tools to write the program. Java Runtime Env (JRE) Which contains everything needed to run a Java program including the JVM. JVM executes the Java bytecode. It converts the bytecode into machine specific code.

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

What is super keyword in Java

A

It is used to reference parent classesmethods and variables.

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

What are wrapper classes and why are they used.

A

Wrapper classes in Java convert primitive data types into objects. It is used to improve utility methods for conversion and manipulation

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

Exceptions versus Errors

A

Exceptions is an event that occurs during the execution of a program that disrupts the normal flow. Errors represent serious issue that is not caught by the application such as segmentation fault.

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

How do you handle exceptions

A

You can handle exceptions utilizing exception handlers like try catch finally(always executes) and throw.

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

Explain Inheritance

A

Inheritance allows child classes(sub classes) to inherits properties and behaviors (variables and methods) from another class.

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

Explain Polymorphism

A

Polymorphism allows an interface or method to be used for different types of objects. This can me achieved from method overloading or overriding. This enhance code flexibility and reuseabiliy

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

What is Method Override

A

This is a form of polymorphism allowing a class to inherit a method and define it in the subclass. ( At Runtime)

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

What is Method Overloading

A

Method Overloading is a form of polymorphism allowing multiple methods in a class to have the same name but different parameter. A good example is a add method where one utilizes ints while the other utilizes floats. ( Done at compile time)

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

What is encapsulation?

A

Encapsulation is one of the 4 pillars of OOP where attributes and methods are bundled together into a class and only expose selective information depending on the access modifiers.

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

What is Abstraction

A

Abstraction is the concept of hiding the complex implementation details and showing only necessary functionalities. It can be achieved with abstract classes and interfaces

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

What is the difference between abstract classes and interfaces

A

Classes can have abstract methods with or without implementations. Classes can only extend one abstract class. On the other hand Interfaces allows for multiple inheritance.

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

Difference between Java keywords private and protected

A

These are accesses modifiers .Protect allows access within the same subclass while private restricts access to the class only.

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

What are project management tools?

A

PMT are software applications that help plan, execute and monitor projects. It provides a centralized platform for collaboration, task tracking, resource management and project organization.

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

What is Maven?

A

Maven is a build automation tool in Java that manages dependencies, automate builds and provides a project lifecycle. ( pom.xml for dependency management)

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

What is the Maven Life Cycle Steps

A

Validating the project
Compile source code
Run tests
Packages the compiled code
Install the packages into local repo
Deploy the package to remote repo

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

Can you explain Agile Development Workflow?

A

Agile is a project management methodology that that uses a flexible iterative and incremental approach to software development focusing on customer feedback and continuous improvements. Key components include short development cycles(sprints) , regular meetings(stand-ups) and collaboration with stakeholders.

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

Explain Solid design principles.

A

Solid principle is a acronym to guide object oriented design. It is used to create systems that are modular, scalable and easy to maintaining.

S -> Single responsibility: Meaning that each class should have one responsibility.

O-> Open/Closed principle: Allowing software entities to be open for extension but closed for modification. ( Allowing entity to extend its behavior without changing source code)

L-> Liskov Substitution Principle: Which is a principle where subtypes should be substitutable for their base types.

I -> Interface Segregation Principle: Clients should not depend on interfaces they do not use

D-> Dependency Inversion: Depend on abstractions not concretions

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

What is DDL in SQL?

A

DDL are command that define the structure of databases such creating and altering tables. ( Create, Alter, Truncate, Drop)

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

What is DML?

A

DML are commands to manipulate date. Common commands include Insert, Update and Delete

22
Q

What is DQL?

A

Data Query Language is to query and retrieve data from a db with the select statement.

23
Q

Explain the constraints Primary, Foreign and Unique.

A

Primary ensures that each row in the table is unique.
Foreign maintains referential integrity between two tables
Uniques ensures that all values in a column are unique

24
Q

Explain Referential Integrity.

A

Ensures a relationship between tables remain consistent. For example a table with a fk that references another table ensures that the foreign key value always matches the existing primary key.

25
Q

What is Data Access Object design pattern

A

It is a design pattern that abstracts and encapsulates all access to the data source. The DAO handles the CRUD operations making the code maintainable and scalable.

26
Q

What is Java Database Connectivity (JDBC) and how do you utilize it?

A

It is a Java API allowing applications to connect and interact with databases.

Load the JDBC driver
Establish connection with Drive Manager
Utilize Statements or PS
Execute and handle Result Sets
Close Connection

27
Q

What is HTTP request and reposnses

A

HTTP is a set of rules the establishes how web browsers and web servers commuicate with each other with each other

28
Q

Explain Logging

A

Logging records information about the applications runtime behavior. This can help with debugging and monitoring.

29
Q

Explain TDD

A

Test driven development is a methodology where tests are written before the actual code.

30
Q

Explain Unit testing

A

Unit testing is used to test individual units of codes such as method or classes.

31
Q

Explain what Mockito is

A

Mockito is a library used to create mock objects in unit test which help simulate behavior of dependencies.

32
Q

Explain Controller Service Repo Archetecture

A

Controller: handles HTTP Responses and Requests
Service layer: Contains business logic and interacts with repository layer
Repository: Manages data access and interacts with the database

33
Q

Difference between Scalar and Aggregate functions

A

Aggregates perform calculations on a set of values. Scalar perform calculation on a single value such as (Round,Length,Concat)

34
Q

Properties of a SQL Transaction

A

Transactions are sequences of operations performed as a single unit of work.

Atomicity: Ensures all operations in a transaction are complete if not then the entire transaction is rolled back

Consistency: Ensures that a transaction bring the DB from one valid state to another

Isolation: Ensures that concurrent transactions do not affect each other’s execution

Durability: Guarantees that once a transaction is commited, it will remain, so, even if a system fails

35
Q

What is TCL and DCL

A

Transaction control language commands deal with tranaction in the database such as COMMIT and ROLLBACK

Data Control Language deals with access control to data base such as GRANT and REVOKE

36
Q

What are SQL stored procedures

A

Precompiled collections of one or more SQL statements in a DB that canexecute as a single command.

37
Q

Explain Dependency Injection

A

It is a design pattern that allows object to receive its dependencies from an external source instead of creating them itself.

38
Q

Explain Inversion Control

A

A principle where control of object creation and binding is inverted from the application to a container.

39
Q

Explain Beans in Spring

A

Beans are objects managed by the Spring IoC container.

40
Q

Explain Constructor Injection

A

Dependencies are provided through class constructors

41
Q

Explain Setter Injection

A

Dependencies are provided thorugh setter methods allowing for optional dependencies and easier config

42
Q

Explain Field Injection

A

Dependencies are injected directly into fields using annotations. Reduces testability.

43
Q

Explain Spring Boot

A

It is an extension of Spring Framework that simplifies setup and development.

44
Q

Explain Model View Controller MVC design pattern

A

It a design pattern that separates an application into three interconnected component.

Model: Represents the data and business logic
View: Represents user interface
Controller: Handles user input and interacts with the model to render the view

45
Q

What is Spring Web and MVC

A

Spring web provides features for building web applications including RESTful services while Spring MVC is a framework that allows the MVC design pattern simplifying development by providing handle request responses and views.

46
Q

What is Spring Data

A

Spring Data helps simplifies data access and interaction with databases by reducing boilerplate code and integrating JPA for ORM (Object relational mapping)

47
Q

What is JPA

A

JPA is Java Persistence API for managing relational data. Providing out of the box CRUD operations and automatic SQL generation thorugh naming conventions

48
Q

What is Lombok

A

It is a library to reduce boilerplate code by providing annotations to automatically generate getters and setter constructor and more.

49
Q

What is Spring Boot Actuator

A

Built in endpoint for monitoring and managing Springboot applications such as health checks , metrics, and environment information

50
Q

What is RESTful API’s

A

Rest( Represents state transfer) is a architectural style for designing network applications. The api provides functions over http such as get post put patch and delete

50
Q
A