Preview

Coding: Questions

Good Essays
Open Document
Open Document
2042 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Coding: Questions
Review for chaps 6,7and 8

1. One or more objects may be created from a(n)
b.
class

2. Class objects normally have __________ that perform useful operations on their data, but primitive variables do not.
a.
fields
b.
instances
c.
methods
d.
relationships

3. In the cookie cutter metaphor, think of the ________ as a cookie cutter and ________ as the cookies.
a.
object; classes
b.
class; objects
c.
class; fields
d.
attribute; methods

4. A UML diagram does not contain
a.
the class name.
b.
the method names.
c.
the field names.
d.
object names

5. Data hiding, which means that critical data stored inside the object is protected from code outside the object is accomplished in Java by
a.
using the public access specifier on the class methods
b.
using the private access specifier on the class methods
c.
using the private access specifier on the class definition
d.
using the private access specifier on the class fields

6. For the following code, which statement is not true?

public class Sphere
{
private double radius; public double x; private double y; private double z;
}

a. x is available to code that is written outside the Circle class.
b.
radius is not available to code written outside the Circle class.
c.
radius, x, y, and z are called members of the Circle class.
d.
z is available to code that is written outside the Circle class.

7. You should not define a class field that is dependent upon the values of other class fields...
a.
in order to avoid having stale data
b.
because it is redundant
c.
because it should be defined in another class
d.
in order to keep it current

8. What does the following UML diagram entry mean?

+ setHeight(h : double) : void

a. this is a public attribute named Height and is a double data type
b.
this is a private method with no parameters and returns a double data type
c.
this is a private attribute named Height and is a double data type
d.
this is a public method with a parameter of data type double

You May Also Find These Documents Helpful

  • Good Essays

    79) The ________ property appears in parentheses so it will appear at the top of the alphabetical Property list.…

    • 3668 Words
    • 15 Pages
    Good Essays
  • Satisfactory Essays

    Structured Query Language (SQL) is a standard database computer language used for querying, modifying and managing data in Relational Database Management Systems (RDBMS). SQL was developed in the 1970's by IBM to initially manipulate and retrieve data in IBM System R. The SQL language was standardized in 1986 by the American National Standards Institute (ANSI); however, later releases were released as International Organization for Standardization (ISO) standards.…

    • 612 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Tutorial Questions Week 3

    • 714 Words
    • 3 Pages

    1. When interpreting legislation, the Courts use several approaches to aid their interpretation. Describe how the literal, golden and mischief rules of interpretation operate.…

    • 714 Words
    • 3 Pages
    Powerful Essays
  • Satisfactory Essays

    Cs Programming Chapter 1

    • 2450 Words
    • 10 Pages

    ____ data items may involve organizing or sorting them, checking them for accuracy, or performing calculations with them.…

    • 2450 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Ap Psychology Quiz

    • 564 Words
    • 3 Pages

    |5. |What is the term for a characteristic or attribute that can assume different values? |…

    • 564 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    a.x is available to code that is written outside the Sphere class. b.radius is not available to code written outside the Sphere class. c.radius, x, y, and z are called members of the Sphere class. d.z is available to code that is written outside the Sphere class.…

    • 1368 Words
    • 9 Pages
    Satisfactory Essays
  • Better Essays

    II. The general syntax for defining a class is shown here. It may look complicated, because it’s written in very general form here, but it’s very simple.…

    • 939 Words
    • 4 Pages
    Better Essays
  • Good Essays

    AP PSYCH

    • 772 Words
    • 3 Pages

    This paper explore lucid dreaming. Although the concept of ‘lucid dreaming’ was first coined by a Dutch psychiatrist known as Frederik Willems van Eeden and introduced at the meeting of The Society for Psychical Research held on April 22 of 1913, the phenomenon of lucid dreaming was already known in earlier historical periods, and its descriptions can be found in writings of Aristotle; however, modern lucid dreaming research was established only after LaBerge introduced his method for physiological investigation of lucid dreaming through eye signals in 1980. Lucid dreamers often report being in possession of all their cognitive faculties: they are able to reason clearly, to remember the conditions of waking life, and to act voluntarily within the dream upon reflection or in accordance with plans decided upon before sleep. This paper also goes into many uses of lucid dreaming. It was especially cultivated in Tibetan Buddhism and is known in Sufism and Indian yoga. The final goal was to be able to maintain consciousness in the event of death so that one could consciously encounter the path to the other world. Recurrent nightmares have been shown to be alleviated by lucid dream induction, though it remains unclear whether this alleviation is because of lucidity itself or the ability to alter some aspect of the dream. Blagrove, Farmer and Williams found that lucid dreaming reduced nightmare suffering, but nightmare frequency remained unchanged. Lucid dreaming is still being studied to this day. Current attempts in the field are directed at defining the neuro-physiological correlates of lucid dreaming, an aim that still has not been achieved. Other possible therapeutic potentials of lucid dreaming are still in the process of being discovered and constitute a fertile area for future researchers.…

    • 772 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Coding Tips

    • 1061 Words
    • 5 Pages

    The term first-listed diagnosis/condition is used in the outpatient setting in lieu of principal diagnosis, once again because of the timing. Often, diagnoses are not established at the time of the initial encounter in the outpatient setting and it may take two or more visits prior to a confirmed diagnosis. The documentation to support the reason for the visit should describe the patient's condition, using terminology that includes either specific diagnoses and/or symptoms, problems, or reasons for the encounter. In the instance where a discrepancy is discovered, determining the first-listed diagnosis per the coding conventions of ICD-9-CM, as well as the general and disease-specific guidelines within ICD-9-CM, will have precedence over the outpatient guidelines.…

    • 1061 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    This can be illustrated by the process of Steganography and encryption using the operating system functions. Steganography is a method of hiding the presence of a message or a file inside another much larger file or message without the forensics knowing it is there in the first place (Westphal, 2003). It is a deliberate act of keeping a message or data hidden. One good example would be hiding pornographic images inside an image…

    • 257 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Questions

    • 372 Words
    • 2 Pages

    9. From what point of view does Cisneros write this narrative essay? How does this particular point of view help us understand her attitude toward experience? She writes it in first person point of view. It gives us the insight on her attitude because it explains her feelings from her point of view.…

    • 372 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    2. Items are numbered consecutively to account for all items; missing items cause a gap in the numerical sequence…

    • 872 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    He was not a fool for not suspecting danger and going to the castle. Up to that point, Mabeth was a respectable and loyal citizen. It wasn't until after the witches spoke with them that Macbeth and Lady Macbeth changed.…

    • 428 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    OCJA exam prep

    • 5816 Words
    • 24 Pages

    2. Which statement represents a valid statement that will allow for the inclusion of classes from the java.util package?…

    • 5816 Words
    • 24 Pages
    Satisfactory Essays
  • Good Essays

    C++ solution

    • 459 Words
    • 2 Pages

    (i) Conversion from Class to Basic Type: We know that conversion from a basic to class type can be easily done with the help of constructors. The conversion from class to basic type is indeed not that easy as it cannot be done using constructors. for this conversion we need to define an overloaded casting operator. This is usually referred to as a conversion function. The syntax for this is as follows:…

    • 459 Words
    • 2 Pages
    Good Essays

Related Topics