Docsity

Computer Science Final Exam Study Guide 2025 with Answers | Java & OOP, Exams of Introduction to Computers

Toggle sidebar
bg1
COMPUTER SCIENCE FINAL EXAM
QUESTIONS AND ANSWERS 2025/2026
LATEST UPDATE
Define the word "program". - answerA set of instructions to achieve a specified goal.
Explain why programming in machine language is undesirable - answerProgramming is 1s and 0s is very
tedious and problematic.
What language uses commands with mnemonic names and hexadecimal numbers? - answerAssembly
language
What is the name of the translator used by Assembly Language? - answerAssembler
List 2 of Grace Hopper's accomplishments. - answerDeveloped program translators & Developed COBOL
Explain the difference between an interpreter and a compiler. - answerCompilers translates the entire
file and then execute.
Interpreters translate each line and execute each line
What is a "low-level" language? - answerClose to computer language
What is a high-level language? - answerClose to human language
Why do we not simply use English, or any other human language, to program a computer? -
answerEnglish is too ambiguous
What was the first successful programming language for the mathematics and scientific
Community language? - answerFORTRAN
pf3
pf4
pf5

Partial preview of the text

Download Computer Science Final Exam Study Guide 2025 with Answers | Java & OOP and more Exams Introduction to Computers in PDF only on Docsity!

COMPUTER SCIENCE FINAL EXAM

QUESTIONS AND ANSWERS 2025/

LATEST UPDATE Define the word "program". - answerA set of instructions to achieve a specified goal.

Explain why programming in machine language is undesirable -tedious and problematic. answerProgramming is 1s and 0s is very

What language uses commands with mnemonic names and hexadecimal numbers? -language answerAssembly

What is the name of the translator used by Assembly Language? - answerAssembler List 2 of Grace Hopper's accomplishments. - answerDeveloped program translators & Developed COBOL Explain the difference between an interpreter and a compiler. -file and then execute. answerCompilers translates the entire Interpreters translate each line and execute each line What is a "low-level" language? - answerClose to computer language What is a high-level language? - answerClose to human language Why do we not simply use English, or any other human language, to program a computer? - answerEnglish is too ambiguous

What was the first successful programming language for the mathematics and scientific Community language? - answerFORTRAN

What does FORTRAN stand for? - answerFormula Translator What community was COBOL created for? - answerbusiness A program is made up of words, which usually are called what? - answerKeywords What is the first Java syntax rule? - answerUse only keywords known by the Java compiler. List the 3 categories of keywords. -identifiers answerReserved words, pre-defined identifiers and user-defined

List 3 examples of Java Reserved Words - answerpublic, static, void Java has a large number of libraries that enhance the basic Java language. These libraries containspecial program modules that perform a variety of tasks to simplify the life of a programmer. What are these modules called? - answermethods List 2 examples of Predefined Identifiers. - answerprint and println What does OOP stand for? - answerObject Oriented Programming What is the difference between C++ and Java with regards to OOP? -use OOP. Java requires it. answerC++ gives you the option to

What are the 4 stages of program design? - answerCryptic Programming Stage Unstructured, Spaghetti-Programming StageStructured Programming Stage Object Oriented Programming Stage

List 7 Math class methods. - answerabs, pow, sqrt, round, floor, ceil, min, max List 2 Math class data members. - answerPI and E Methods of the Math class are called what type of methods? - answerClass Methods What is wrong with program Java0601.java? -manner as the Math class. answerThe Bank class does not allow access in the same

Class methods are normally what? -access changing data fields. answerClass methods are normally utility methods that do not

How must the methods of the Math class be accessed? -must be accessed using the Math class identifier. answerMethods in Math are class methods and

In the statement int num; int is the _________________ and num is the _________________. - answerint is the type and num is the variable.

In the statement Bank tom; Bank is the _________________ and tom is the_________________. - answerclass Bank is the type and the object tom is the variable.

List 4 simple data types. - answerint, double, char, and boolean What do simple data types store? - answeronly a single value What is the single most important goal for any program? - answerReliability What does GUI stand for? - answerGraphics User Interface

What are the 3 cornerstones of OOP? - answerEncapsulation, Inheritance and Polymorphism What 2 things do objects store? - answerAttributes and methods What makes objects unique? - answerObjects are one single instance of a class. Explain encapsulation. -the same module answerEncapsulation places the data and those methods that access the data in

What is Encapsulation? -the methods, which answerEncapsulation is the OOP feature whereby the data of an object and all access the data are placed in the same container Why is OOP so popular? -more reliable, easier to test and answerThere are so many features that make a program better designed, simpler to update than previous, non-OOP programs used to be. What is inheritance? -from an existing class. answerInheritance is the process of using features (both attributes and methods)

In inheritance, the existing class is called the _______________ and the new class, which inherits the features of the existing class, is called the _______________. - answersuperclass & subclass In computer science an is-a relationship involves _______________. - answerinheritance In computer science a has-a relationship involves _______________. - answerComposition When should you use the for loop? - answerfixed iteration

String s2; s2 = "Skiing";String s3 = new String("Skiing"); String s4 = new String();s4 = "Skiing"; char sport[] = {'S','k','i','i','n','g'};String s5 = new String(sport);

In Java, is a String an Array of Characters? - answerNo What is concatenation? -string. answerThe process of appending a second string at the end of an existing

Write two different program statements that both perform the same concatenation. -"Hello "; answerString s1 = String s2 = "George";String s3 = s1 + s2; String s1 = "Hello ";String s2 = "George"; String s3 = s1.concat(s2); Which method accesses only single characters in a String object? - answercharAt and replace Which method accesses one or more characters in a String object? - answersubstring