Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Define the term Class . Group of answer choices A template that declares the variables and functions that will be contained in objects

Question 1

Define the term Class.

Group of answer choices

A template that declares the variables and functions that will be contained in objects of that type.

An object created with specific values for data members that you can call member functions on.

The method of keeping member variables private and creating public accessor and mutator functions to give you more control over the data inside your objects.

This concept allows for easy conceptualization of objects by eliminating unneccessary implementation details.

Question 2

Define the term Abstraction.

Group of answer choices

The method of keeping member variables private and creating public accessor and mutator functions to give you more control over the data inside your objects.

An object created with specific values for data members that you can call member functions on.

A template that declares the variables and functions that will be contained in objects of that type.

This concept allows for easy conceptualization of objects by eliminating unneccessary implementation details.

: Question 3

Define the term Instance.

Group of answer choices

An object created with specific values for data members that you can call member functions on.

This concept allows for easy conceptualization of objects by eliminating unneccessary implementation details.

The method of keeping member variables private and creating public accessor and mutator functions to give you more control over the data inside your objects.

A template that declares the variables and functions that will be contained in objects of that type.

Question 4

Define the term Data Hiding.

Group of answer choices

An object created with specific values for data members that you can call member functions on.

The method of keeping member variables private and creating public accessor and mutator functions to give you more control over the data inside your objects.

This concept allows for easy conceptualization of objects by eliminating unneccessary implementation details.

A template that declares the variables and functions that will be contained in objects of that type.

Question 5

Look at the code below used to implement a Student class. Select which of the statements that follow are true for this class.

public class Student { private String name; private double gpa; public String getName(){...} void setName(String){...} double getGpa(){...} void setGpa(double){...} boolean isHonors(){...} }

Group of answer choices

This defines a single student and more declarations like this will be needed to create more students.

The function main( ) in the Main class cannot call the isHonors( ) function on a Student object.

The function main( ) in the Main class has direct access to the name variable of a Student object.

The function main( ) in the Main class must use the getName( ) function on a Student object in order to print a student's name.

: Question 6

Look at the code below used to create Student objects and set some of their values. What gets printed to the screen when this code is executed?

Student harry = new Student(); Student hermione = new Student(); Student ron = new Student( ); harry.setGpa(3.2); hermione.setGpa(4.0); ron.setGpa(2.7); System.out.println(hermione.getGpa());

Group of answer choices

3.2

4.0

2.7

3.4

Question 7

Look at the code below used to implement a function from the class Student. Select which of the statements that follow are true for this class.

public class Student { // Other irrelevant code public boolean isHonors(){ return gpa >= 3.7; } } 

Group of answer choices

This function has direct access to the gpa member variable of a Student object.

This function is a member of the Honors class.

This function returns a double.

Just from looking at this code we can tell that this function cannot be called in the main( ) function.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases With Application To GIS

Authors: Philippe Rigaux, Michel Scholl, Agnès Voisard

1st Edition

1558605886, 978-1558605886

More Books

Students also viewed these Databases questions

Question

What are Electrophoresis?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago