Question: ********EXPLAIN CLEARLY************ List the 3 main design principles of Object-Oriented Programming: List the 4 primary programming logic constructs. List the 3 parts of an iterative

********EXPLAIN CLEARLY************

List the 3 main design principles of Object-Oriented Programming:

List the 4 primary programming logic constructs.

List the 3 parts of an iterative structure.

Name the 3 types of errors.

Explain overriding.

Explain overloading.

Explain casting.

Explain the keyword throws

Explain the keyword extends

Explain the keyword void

Explain the keyword static

List the 3 elements of a Java class definition:

12.Assume the following Java declaration statement:

int [][] matrix = {{2,4,6,8,10,12},{3,6,9,12,15,18},{1,2,3,4,5,6}};

What is the value of matrix.length?

What is the value of matrix[2].length?

What is displayed by the following Java statement?

for (int i = 0; i < matrix.length; i++)

System.out.print( matrix[i][0] + );

Write the code segment to find the sum of the entire matrix. Use sum, I and j

Consider the following method definitions:

public static void main(String[] args){

int count = 3;

printString(Java, count);

}

public static void printString(String message, int number){

for (int i = 0; i < number; i+) System.out.println(message);

}

What are the names of the formal parameters for method printString?

What is the signature of method printString?

What are the arguments for method printString?

How many times is the printString method invoked?

What output is produced when main is executed?

Write a method called Dash which will have the formal parameters of a character and an integer that will print a dash of type chat integer length. The signature would look like this:

Dash(*,5);

Would result in a dash like this: *****

Use the following segment of Java code to answer the questions:

public class Employee {

private String firstName;

private String lastName;

private java.util.Date hireDate;

public Employee(){...}

public String getfirstName() {}

public String getlastName() {}

public String getdateHired() {}

public void setLastName(String l){...}

public void setFirstName(String f){...}

public void setName(String f, String l){...}

public void print(){...}

public String toString() {.}

}

public class SalariedEmployee extends Employee{

private String title;

private double yearlySalary;

public SalariedEmployee(){...}

public void setSalEmp(String f, String l){...}

public void setSalEmp(String f, String l, double s){...}

public void print(){...}

public String toString () {..}

}

What object-oriented programming principle is demonstrated by line 1?

What object-oriented programming principle is demonstrated by line 15?

In this example, which class is considered the subclass?

Give the name of the overloaded method(s) in this example.

Give the name of the overridden method(s) in this example.

List the attributes of a SalariedEmployee object:

Write the code that would create an array of 100 SalariedEmployees

Write a void static method called LastName_Salary which will list only the last name and the tabbed yearly salary of each employee.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!