Revature Interview

¡Supera tus tareas y exámenes ahora con Quizwiz!

Abstraction vs Interfaces

-An interface differs from an abstract class because an interface is not a class. -a class that implements an interface must provide an implementation of all the methods of that interface -abstract classes are meant to be inherited from. -interfaces may be multiple-inherited, abstract classes may not (this is probably the key concrete reason for interfaces to exist separately from abstract classes -If you think you will need to add methods in the future, then an abstract class is a better choice. Because if you add new method headings to an interface, then all of the classes that already implement that interface will have to be changed to implement the new methods. That can be quite a hassle.

c++

-c++ is a lower language, can be used to program operating systems unlike c# -aimed more for linux, osx while c# for windows -like c but with extension that allow oop while c# like java

difference between java and c#

-java runs on a virtual machine while C# is a Microsoft language based on .NET. -C# is less verbose -C# interfaces cannot declare fields -java extension is .java and C# is .cs - C# represents all primitive data types as objects -comparing string values is different in C# and Java. To compare string values in Java, developers need to call the equals method. In C#, developers can use the == or != operators to compare string values directly.

Arrays

A collection of primitive values or object reference organized with an index. A specific amount of memory is reserved for an array based on the size and data type

What does it mean to have a "Normalized" database?

A process to remove redundancy across tables instead of having multiple of the same fields in different tables you can consolidate them into and ID so you are able to refer to one ID

relational database

A relational database is a collection of data items organized as a set of formally-described tables from which data can be accessed or reassembled in many different ways without having to reorganize the database tables.

Variables

A structure for temporarily storing data in your computers memory 1. primitive variables - data types like integers, decimals, and alphanumeric characters 2. reference variables- store memory addresses where objects are located. use a class (name) as their type and can only point to objects that are instances of the class that is their type

API

Application Programming Interface - Contains the complete listing for all packages, interfaces, classes, fields, and methods supplied by the Java SE platform

CSS

Cascading Style Sheet

What are checked and unchecked exceptions?

Checked: are the exceptions that are checked at compile time. If some code within a method throws a checked exception, then the method must either handle the exception or it must specify the exception using throws keyword. (array index out of range) Unchecked are the exceptions that are not checked at compiled time. (ArithmeticException: / by zero)

SQL Statements

DDL (Data Definition Language): define database structure - CREATE, ALTER, DROP. in ALTER you can add/remove columns and constraints DML (Data Manipulation Language): managing data within tables - SELECT, INSERT, UPDATE, DELETE (CRUD: create, read, update, and delete) TLC (Transaction Control Language): manage how DML statements are issued and executed

What is DBMS?

Database Management System

Generics

Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces and methods. Generics add stability to your code by making more of your bugs detectable at compile time. Benefits: 1. Strong type checks at compile time and easier to fix errors than runtime errors because it's difficult to find. 2. Eliminates type casting. Ex: String s = (String) list.get(0)

What is a setter/ what is a getter? What is their purpose?

Getters and setters in Java are methods that let us read and write the value of an instance variable of an object.And this is the way we can set and get values rather than directly exposing fields of a class.

Inheritance

Inheritance allows a class to use the properties and methods of another class. Allows parent/child relationship. Example: car and truck inherit functions of vehicle but car is not truck or vice versa. A class inherits fields and methods from all its superclasses, whether direct or indirect. A subclass can override methods that it inherits, or it can hide fields or methods that it inherits.

difference between method overloading and method override?

Method overloading deals with the notion of having two or more methods in the same class with the same name but different arguments. void foo(int a) void foo(int a, float b) Method overriding means having two methods with the same arguments, but different implementations. One of them would exist in the parent class, while another will be in the child class. class Parent { void foo(double d) { class Child extends Parent { @Override void foo(double d){ // this method is overridden.

Does java support multiple inheritance?

No; but can mimic it by making an interface and implementing it while inheriting the class methods also

non-static field (instance variable)

Non-static fields are known as instance variables because their values are unique to each instance of a class. Ex: currentSpeed of one bicycle is independent from the currentSpeed of another

static field (Class variables)

Only one copy of this variable, regardless of how many times the class has been instantiated. A field defining the number of gears for a particular kind of bicycle could be marked as static since conceptually the same number of gears will apply to all instances. The keyword final could be added to indicate that the number of gears will never change.

What is RDBMS?

Rational Database Management System - stores data into tables with columns and rows Ex. SQL Server

SQL Select: used to select data from a database. Ex: SELECT column_name,column_name FROM table_name; SELECT * FROM table_name; SQL SELECT DISTINCT: used to return only distinct (different) values. SELECT DISTINCT column_name,column_name FROM table_name; SQL WHERE: used to filter records. SELECT * FROM Customers WHERE Country='Mexico'; SQL AND & OR: used to filter records based on more than one condition. The AND operator displays a record if both the first condition AND the second condition are true. The OR operator displays a record if either the first condition OR the second condition is true. AND: SELECT * FROM Customers WHERE Country='Germany' AND City='Berlin'; OR: SELECT * FROM Customers WHERE City='Berlin' OR City='München'; AND & OR: SELECT * FROM Customers WHERE Country='Germany' AND (City='Berlin' OR City='München'); SQL ORDER BY: The ORDER BY keyword is used to sort the result-set by one or more colu

SQL UPDATE: UPDATE Customers SET ContactName='Alfred Schmidt', City='Frankfurt' WHERE CustomerID=1; SQL DELETE: DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste' AND ContactName='Maria Anders'; SQL SELECT INTO: selects data from one table and inserts it into a new table. SELECT * INTO CustomersBackup2013 FROM Customers; SQL CREATE DATABASE: CREATE DATABASE dbname; SQL CREATE TABLE: (The 255 number means max length of columns) CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) ); SQL Constraints: used to specify rules for the data in a table. SQL NOT NULL: The NOT NULL constraint enforces a column to NOT accept NULL values. LastName varchar(255) NOT NULL, SQL UNIQUE: Here, AGE column is set to UNIQUE, so that you can not have two records with same age: CREATE TABLE CUSTOMERS( ID INT NOT NULL, NAME VARCHAR (20) NOT NULL, AGE INT NOT NULL UNIQUE, ADDRESS CHAR (25) , SALARY DECIMAL (18, 2), PRIMARY KEY (ID) ); SQL PRIMARY KEY: Each table should have a primary key. Define a primary key that is guaranteed to uniquely identify each record. A primary key column cannot have NULL values. A table can have only one primary key. SQL FOREIGN KEY: A FOREIGN KEY in one table points to a PRIMARY KEY in another table.

Difference between == and .equals()

The == operator tests whether two variables have the same references (identity) aka memory address. Whereas the equals() method tests whether two variables refer to objects that have the same state (values).

garbage collection

The Java runtime environment deletes objects when it determines that they are no longer being used.

Polymorphism

The ability of different objects to respond differently to identical messages. Ex: Triangle and Rectangles are Shape objects. Shapes are drawn but each are drawn in different ways.

static keyword

The static keyword means that the variable or function is shared between all instances of that class. In other words, if a class has a static field named CompanyName, all objects created from the class will have the same value for CompanyName.

Number/String Object

There are three reasons that you might use a Number object rather than a primitive: 1. Sometimes you want to use a char as an object for a method argument where an object is expected. 2. To use constants defined by the class, such as MIN_VALUE and MAX_VALUE 3. To use class methods for converting values to and from other primitive types, for converting to and from strings You can use the format() method or valueOf() to change string to number.

Use case diagram

Use case- summary of scenarios for a single task or goal. Shows scenarios of what happens when someone interacts with the system. ex: patient calls clinic to make appointment. Receptionist finds empty slot and schedules it. Helpful in 3 areas: Determining features, communicating with clients, generating test cases

final keyword

Used to identify constants (unchangeable variables) usually in combination with the static keyword

Wrapper Class

Wrapper class in java provides the mechanism to convert primitive into object and object into primitive. //Converting int into Integer int a=20; Integer i=Integer.valueOf(a);

How to create and use objects

You can declare, instantiate using new keyword, or initialize by using new and calling constructor You can call object fields using the dot method and calling its functions

Enum

You should use enum types any time you need to represent a fixed set of constants.

jQuery

a JavaScript library that makes common functions and tasks easy to do that are done all the time in JavaScript

Constructors

a bit of code that allows you to create objects from a class.

class

a blueprint or prototype from which objects are created. a representation of a type of object. Example: class called Vehicle describes the minimum things that a vehicle is.

foreign key

a column in a table that refers to the primary key of another table linking two tables together

Interface

a description of the actions that an object can do. an Interface is a description of all functions that an object must have in order to be an "X". http://images.slideplayer.com/14/4328130/slides/slide_3.jpg

eXtensible Markup Language (XML)

a file type that allows you to organize data.

Activity Diagrams

a flow chart to represent the flow from one activity to another activity.

annotations

a form of metadata, provide additional info that can be used by the Java compiler. Examples: @Override-override a method in a superclass. @Deprecated-used to mark a class, method or field as deprecated, meaning it should no longer be used.

Unified Modeling Language (UML)

a general-purpose, developmental, modeling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system. Using Activities, Actors, Database Schemas, Programming Language Statements. UML's appear in the Software Requirements Specification (SRS) document- a description of a software system to be developed. It lays out functional and non-functional requirements, and may include a set of use cases that describe user interactions that the software must provide. -(static) Structure diagrams show the things in a system being modeled. In a more technical term, they show different objects in a system. Ex: Use-case, class -(Dynamic) Behavioral diagrams shows what should happen in a system. They describe how the objects interact with each other to create a functioning system. Ex: Sequence, Activity

Package

a namespace that organizes a set of related classes and interfaces. Used to keep things organized by placing related classes and interfaces into packages. Used in Java in order to prevent naming conflicts.

(RDBMS) Relational Database Management System

a program, a basis for SQL, that lets you create, update, and administer a relational database. MySQL is one system

Object-oriented programming (OOP)

a programming language model organized around objects that have data and methods that form the object. It's an instance of a class. four main concepts: 1. Encapsulation 2. Abstraction 3. Inheritance 4. Polymorphism.

Association

a relationship between two classes. there is no owner between objects. For example, a teacher *has-a* or *teaches* a student. There is no ownership between the teacher and the student

Structured Query Language (SQL)

a standard language for accessing and manipulating databases.

Composition

a strong type of Association with full ownership. This is strong compared to the weak Aggregation. For a Composition relationship, we use the term *owns*. For example, a car has an engine. if you take away that engine the car doesn't function anymore.

Aggregation

a weak type of Association with partial ownership. For an Aggregation relationship, we use the term *uses*. For example, a person has an address. if you take away the address, nothing really changes the person.

type inference

automatic deduction of the data type of an expression. c# type inference using var c# can figure out what the type of the data is. var x = 'string' c# figures that the x is of a string data type

Instance variable

declared in the class scope { } denote a change in scope

Class diagrams

gives an overview of a system by showing its classes and relationships among them. Class diagrams are static- they display what interacts but not what happens when they do interact. Relationships of Class Diagrams: -Association: just shows a link connecting two classes -Aggregation: shows which class belongs to a collection. For example, the class "library" is made up of one or more books, among other materials. In aggregation, the contained classes are not strongly dependent on the life cycle of the container. In the same example, books will remain so even when the library is dissolved. Composition: Stronger form of aggregation. For example, a shoulder bag's side pocket will also cease to exist once the shoulder bag is destroyed. -Generalization: Shows a class is a superclass of the other. Ex: Payment is a superclass of Cash, Check and Credit -Realization: denotes the implementation of the functionality defined in one class by another class. Ex: the printing preferences that are set using the printer setup interface are being implemented by the printer.

Abstraction

its a concept that places emphasis on what an object is or does rather than how it works.

Local variables

local variables are only visible to the methods in which they are declared; they are not accessible from the rest of the class.

Why use an interface?

main use is polymorphism, or the ability to perform the same operation on a number of different objects.

Stored Procedure

prepared SQL code that you save so you can reuse the code over and over again. So if you think about a query that you write over and over again, instead of having to write that query each time you would save it as a stored procedure and then just call the stored procedure to execute the SQL code that you saved as part of the stored procedure.

primary key

specifies a column value that is unique and not null a table may only have zero or one primary or composite keys

Encapsulation

the principle of information hiding and wrapping code together into a single unit. data is not accessed directly

SDLC (Software Development Life Cycle)

the process of developing software through analysis, design, implementation and maintenance. Analysis: used to plan the basic project approach and to conduct product feasibility Requirements: clearly define and document the product requirements Design: this is where the design functions and operations are described in detail. Diagrams and pseudocode are some ways to describe the software. Development: this is where the the product starts getting built. Implementation: After making the product it goes into testing Maintenance: Fixing bugs and updating technologies. Agile is an example where requirements are flexible whereas, waterfall has a set path and predictability.

Sequence Diagrams

used primarily to show the interactions between objects in the sequential order that those interactions occur.

Datatypes

varchar: string of any character data integer: signed 32-bit whole number smallint: 16-bit whole number float: floating point number date: a date value timestamp: includes data and time null: represents an empty value


Conjuntos de estudio relacionados

:) CHAPTER 41: MEGERS AND TAKEOVERS

View Set

BIO 313 Details of Digestive System

View Set

Marketing Chapter 2 The Marketing Plan

View Set

FIN 3403 - CH 7 - Bonds and Bond Valuation

View Set

Module 5 - Cash, Receivables, Inventory, and PP&E

View Set

Insurance Exam - May 2024 - Georgia

View Set

UNIT 22 series 65 trading securities

View Set