When the machine cycle performs the execute step, it is ________
A) storing the results
B) retrieving an instruction from the main memory
C) processing a command in the ALU
D) translating an instruction into a computer command
C
You might also like to view...
A(n) ________________________ is useful for implementing a graph when the number of vertices can change.
A. dynamic adjacency list B. dynamic vertex structure C. adjacency matrix hash table D. adjacency list hash table
Which of the following icons is a Play Animations icon?
A.
B.
C.
D.
Create an application that allows the user to enter the lengths for the three sides of a triangle as integers. Your application should then deter- mine whether the triangle is a right triangle (two sides of the triangle form a 90-degree angle), an equilateral triangle (all sides of equal length) or neither. Your application’s GUI is completed for you (Fig. 18.39). You must create a class to represent a triangle object and declare the createJButtonActionPerformed method.
a) Copying the template to your working directory. Copy the C:Examples Tutorial18ExercisesTriangleCreator directory to your C:SimplyJava direc- tory.
b) Opening the template files. Open the TriangleCreator.java and Triangle.java
files in your text editor.
c) Declaring variables. View the Triangle.java file and declare three int variables (side1, side2, side3) starting on line 6 to hold the length of each side. They should all be declared private so that only the methods of this class can access them.
d) Declaring the necessary get and set methods. After the instance variable declarations declare a constructor that will take the lengths of the three sides of a triangle as argu- ments. Your constructor should always set instance variables by using corresponding set methods. Following the constructor, create three pairs of get and set methods that enable clients to access and modify the lengths of the three sides. If the user enters a negative value, that side should be assigned the
Both arrays and structures are ____________________ data types.
Fill in the blank(s) with the appropriate word(s).