Skip to main content

Fundamentals of Computing Practice Questions - 620 Verified Questions

Page 1


Fundamentals of Computing Practice Questions

Course Introduction

Fundamentals of Computing introduces students to the essential concepts and tools that underpin modern computer science. The course covers key topics such as algorithms, data structures, computer organization, programming principles, software development, and basic problem-solving techniques. Students will gain hands-on experience through programming exercises, typically using languages such as Python or Java, to develop logical thinking and computational skills. By exploring the theoretical and practical aspects of computing, this course prepares students for more advanced study and provides a solid foundation for understanding how software and hardware systems function in various real-world applications.

Recommended Textbook

Starting Out with Java Early Objects 5th Edition by Tony Gaddis

Available Study Resources on Quizplus

16 Chapters

620 Verified Questions

620 Flashcards

Source URL: https://quizplus.com/study-set/1061 Page 2

Chapter 1: Introduction to Computers and Java

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20979

Sample Questions

Q1) The purpose of validating the results of the program is to

A) determine if the program solves the original problem.

B) correct runtime errors.

C) create a model of the program.

D) correct syntax errors.

Answer: A

Q2) A solid-state drive has no moving parts and operates faster than a traditional disk drive.

A)True

B)False

Answer: True

Q3) Whereas ________ is centered on creating procedures, ________ is centered on creating objects.

A) procedural programming, object-oriented programming

B) object-oriented programming, procedural programming.

C) routine programming, method programming,

D) procedural programming, class programming.,

Answer: A

To view all questions and flashcards with answers, click on the resource link above. Page 3

Chapter 2: Java Fundamentals

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20980

Sample Questions

Q1) Which of the following statements will correctly convert the data type, if x is a float and y is a double?

A) x = float y;

B) x = <float>y;

C) x = (float)y;

D) x = y;

Answer: C

Q2) Which of the following is not a rule that must be followed when naming identifiers?

A) After the first character, you may use the letters a-z, A-Z, an underscore, a dollar sign, or digits 0-9.

B) Identifiers can contain spaces.

C) Uppercase and lowercase characters are distinct.

D) The first character must be one of the letters a-z, A-Z, an underscore or a dollar sign. Answer: B

Q3) The System.out.printf method allows you to format output in a variety of ways.

A)True

B)False

Answer: True

To view all questions and flashcards with answers, click on the resource link above. Page 4

Chapter 3: A First Look at Classes and Objects

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20981

Sample Questions

Q1) A constructor is a method that

A) returns an object of the class.

B) never receives any arguments.

C) performs initialization or setup operations.

D) removes the object from memory.

Answer: C

Q2) In the blueprint/house analogy, think of a class as a blueprint that describes a house and ________ as instances of the house built from the blueprint.

A) methods

B) fields

C) objects

D) attributes

Answer: C

Q3) You use this key word to import a class.

A) import

B) assume

C) use

D) link

Answer: A

To view all questions and flashcards with answers, click on the resource link above.

Page 5

Chapter 4: Decision Structures

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20982

Sample Questions

Q1) What will be the value of x after the following code is executed?

Int x = 75;

Int y = 60;

If (x > y)

X = x - y;

A) 60

B) 75

C) 15

D) 135

Q2) An important style rule you should adopt for writing if statements is to write the conditionally executed statement on the line after the if statement.

A)True

B)False

Q3) In an if-else statement, if the boolean expression is false

A) no statements or blocks are executed.

B) the statement or block following the else is executed.

C) the first statement or block is executed.

D) all statements or blocks are executed.

To view all questions and flashcards with answers, click on the resource link above.

6

Chapter 5: Loops and Files

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20983

Sample Questions

Q1) Assume that inputFile references a Scanner object that was used to open a file. Which of the following while loops shows the correct way to read data from the file until the end of the file is reached?

A) while (inputFile.nextLine == " ")

B) while (inputFile != null)

C) while (!inputFile.EOF)

D) while (inputFile.hasNext())

Q2) How many times will the following do-while loop be executed?

Int x = 11; Do

{ X += 20;

} while (x <= 100);

A) 5

B) 4

C) 3

D) 1

Q3) You can use the PrintWriter class to open a file and write data to it.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: A Second Look at Classes and Objects

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20984

Sample Questions

Q1) You may use this to compare two enum data values.

A) the ordinal method

B) the ==, >, and < operators

C) the equals and compareTo methods

D) the moreThan, lessThan, and equalsTo methods

Q2) The names of the enum constants in an enumerated data type must be enclosed in quotation marks.

A)True

B)False

Q3) If the following is from the method section of a UML diagram, which of the following statements is true?

+ equals(object2:Stock) : boolean

A) This is a public method that accepts a Stock object as its argument and returns a boolean value.

B) This is a public method that returns a reference to a String object.

C) This is a private method that receives two objects from the Stock class and returns a boolean value.

D) This is a private method that returns a boolean value.

To view all questions and flashcards with answers, click on the resource link above.

8

Chapter 7: Arrays and the ArrayList Class

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20985

Sample Questions

Q1) What does &lt;String&gt; specify in the following statement?

ArrayList&lt;String&gt; nameList = new ArrayList&lt;String&gt;();

A) It specifies that String objects may not be stored in the ArrayList object.

B) It specifies that everything stored in the ArrayList object will be converted to a String object.

C) It specifies that only String objects may be stored in the ArrayList object.

D) It specifies that the ArrayList will be converted into a String array.

Q2) An array of String objects

A) is arranged the same as an array of primitive objects.

B) is compressed to 4 bytes for each element.

C) must be initialized when the array is declared.

D) consists of an array of references to String objects.

Q3) What does the following statement do?

Double[] array1 = new double[10];

A) declares array1 to be a reference to an array of double values

B) will allow valid subscripts in the range of 0 through 9

C) creates an instance of an array of 10 double values

D) All of the above

To view all questions and flashcards with answers, click on the resource link above.

9

Chapter 8: Text Processing and Wrapper Classes

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20986

Sample Questions

Q1) You cannot assign a value to a wrapper class object.

A)True

B)False

Q2) If a string has more than one character used as a delimiter, we must write a loop to determine the tokens, one for each delimiter character.

A)True

B)False

Q3) Which of the following import statements is required to use the StringTokenizer class?

A) import java.util.Scanner

B) import java.text.DecimalFormat;

C) import java.util.StringTokenizer;

D) import javax.swing.JOptionPane;

Q4) StringBuilder objects are not immutable.

A)True

B)False

Q5) Trying to extract more tokens than exist from a StringTokenizer object will cause an error.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Inheritance

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20987

Sample Questions

Q1) If ClassC is derived from ClassB, which is derived from ClassA, this would be an example of

A) a chain of inheritance.

B) linear inheritance.

C) multiple interfaces.

D) cascading classes.

Q2) An abstract class is not instantiated itself, but serves as a superclass for other classes.

A)True

B)False

Q3) This key word indicates that a class inherits from another class.

A) final

B) super C) implements

D) extends

Q4) You can write a super statement that calls a superclass constructor, but only in the subclass's constructor.

A)True B)False

To view all questions and flashcards with answers, click on the resource link above. Page 11

Chapter 10: Exceptions and Advanced File I/O

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20988

Sample Questions

Q1) If a class has fields that are objects of other classes, those classes must implement the Serializable interface in order to be serialized.

A)True

B)False

Q2) To write data to a binary file, you create objects from the following classes:

A) File and Scanner.

B) BinaryFileWriter and BinaryDataWriter.

C) FileOutputStream and DataOutputStream.

D) File and PrintWriter.

Q3) An exception object's default error message can be retrieved using this method.

A) getMessage

B) getDefaultMessage

C) getDefaultErrorMessage

D) getErrorMessage

Q4) A class must implement the Serializable interface in order for objects of the class to be serialized.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: GUI Applications Part 1

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20989

Sample Questions

Q1) A(n) ________ is an action that takes place within a program, such as the clicking of a button.

A) event

B) selection

C) incident

D) choice

Q2) When a component is added to a region in the BorderLayout manager,

A) the component is stretched so it fills up the entire region.

B) the component retains its original size.

C) the region is resized to fit the component.

D) the region and the component are resized to fit the frame.

Q3) Programs that operate in a GUI environment must be event-driven.

A)True

B)False

Q4) If button1 references a JButton object, which of the following statements will make its background blue?

A) button1.makeBackground(Color.BLUE);

B) button1.setBackground(Color.BLUE);

C) button1.makeBackground(BLUE);

D) button1.set.Background(BLUE);

Page 13

To view all questions and flashcards with answers, click on the resource link above.

Chapter 12: GUI Applications Part 2

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20990

Sample Questions

Q1) To add a component to a scroll pane, you must pass a reference to the component as an argument to the JScrollPane constructor.

A)True

B)False

Q2) Which of the following file types is not supported by the ImageIcon class?

A) JPEG

B) GIF

C) BMP

D) PNG

Q3) What is the default directory for the JFileChooser constructor when you pass a String containing a valid path as an argument?

A) If you are using Windows, this will probably be the "My Documents" folder under your account.

B) If you are using UNIX, this will be your login directory.

C) Both A and B

D) None of the above

Q4) The JList and JTextArea components do not automatically display scroll bars.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 13: Applets and More

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20991

Sample Questions

Q1) Applets are important because they can be used to extend the capabilities of a stand-alone Java application.

A)True

B)False

Q2) For all Swing components except JApplet and JFrame, you should override this method to get a reference to the component's Graphics object.

A) paintComponent

B) paint

C) paintBase

D) repaint

Q3) Which of the following is one way to get a reference to the Graphics object for an AWT component or a class that extends JApplet or JFrame?

A) Override the component's paint method.

B) Create a static instance of the Graphics object.

C) Pass an instance of the Graphics object as an argument to the component's constructor.

D) Create an instance of any class that extends the Graphics2D class.

To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 14: Creating GUI Applications with JavaFX

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20992

Sample Questions

Q1) A window in a GUI commonly consists of several ________ that present data to the user and/or allow interaction with the application.

A) modules

B) components

C) elements

D) buttons

Q2) Like RadioButtons, CheckBoxes may be selected or deselected at run time.

A)True

B)False

Q3) A ________ is a tree-like, hierarchical data structure that contains nodes.

A) scene graph

B) class hierarchy

C) UML diagram

D) tree graph

Q4) Even if a variable will not reference a component in the GUI, it is necessary to precede the declaration by the @FMXL annotation.

A)True

B)False

To view all questions and flashcards with answers, click on the resource link above.

Page 16

Chapter 15: Recursion

Available Study Resources on Quizplus for this Chatper

20 Verified Questions

20 Flashcards

Source URL: https://quizplus.com/quiz/20993

Sample Questions

Q1) This occurs when method A calls method B, which in turn calls method A.

A) dynamic recursion

B) linear recursion

C) direct recursion

D) indirect recursion

Q2) A method is called from the main method for the first time. It then calls itself seven times. What is the depth of recursion?

A) 1

B) 7

C) 8

D) 6

Q3) A recursive method can have no more than one base case.

A)True

B)False

Q4) Which of the following problems can be solved recursively?

A) greatest common denominator

B) towers of Hanoi

C) binary search

D) All of the Above

To view all questions and flashcards with answers, click on the resource link above. Page 17

Chapter 16: Databases

Available Study Resources on Quizplus for this Chatper

40 Verified Questions

40 Flashcards

Source URL: https://quizplus.com/quiz/20994

Sample Questions

Q1) A qualified column name takes the following form:

A) ColumnName.TableName

B) TableName.ColumnName

C) RowName.TableName

D) DatabaseURL.ColumnName

Q2) This SQL statement can be used to create a database table.

A) NEW TABLE

B) MAKE TABLE

C) BUILD TABLE

D) CREATE TABLE

Q3) Although SQL is a language, you don't use it to write applications.

A)True

B)False

Q4) The DBMS works directly with the data, and sends the results of operations

A) back to the application.

B) along the encrypted data path.

C) to the unified data component.

D) back to the Web server.

To view all questions and flashcards with answers, click on the resource link above. Page 18

Turn static files into dynamic content formats.

Create a flipbook
Fundamentals of Computing Practice Questions - 620 Verified Questions by Quizplus - Issuu