BCIS 3680 EXAM 3 STUDY GUIDE, Exams of Advanced Education

BCIS 3680 EXAM 3 STUDY GUIDE 2026

Typology: Exams

2025/2026

Available from 01/13/2026

PRO.BILLY
PRO.BILLY 🇺🇸

1.6K documents

1 / 10

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
BCIS 3680 EXAM 3 STUDY GUIDE
1. Exception Handling - Answers --intercepting and responding to exceptions
1.1 Be able to describe the following: error, unchecked exception, checked exception,
logical error. - Answers -EXCEPTION: generated as the result of an error or an
unexpected event.-Throwable class(either error or exception)
CHECKED EXCEPTION:
-compiler will examine your code before compiling. If it finds an issue, your program
won't be able to compile until you address it(Java)
"passing the buck" = throwing the exception(dodge it)
CHECKED EXCEPTION:exceptions occur due to reasons that are not controllable by
the programmer - Answers -UNCHECKED EXCEPTION:
-result of a serious condition that are not under the programmer's control
-critical errors
EX. internal error, run out of memory
EX. AWTError, ThreadDeath, VM Error
UNCHECKED EXCEPTIONS:-unchecked by compilerRuntimeExceptiontry-catch-finally
(result of sloppy programming/ avoided with properly written code)
LOGICAL ERRORS: - Answers -programmer errors that won't generate any exceptions
in code but will cause logical errors
EX. error in variables, method names, data types
1.2 Know the superclass of all exceptions and the major methods that provide
information about an exception. - Answers -getMessage()
-returns a string indicating the cause of the exception.
toString()
-returns a string containing the exception class name and what would be returned by
getMessage().
printStackTrace()
-prints the line number of the code that caused the exception, plus the sequence of
method calls leading up to the exception.
STACKTRACE=list of all the methods executing.
1.3 Know the rules governing the handling of exceptions. - Answers -EXCEPTION
HANDLER:-section of code that gracefully responds to exceptions.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download BCIS 3680 EXAM 3 STUDY GUIDE and more Exams Advanced Education in PDF only on Docsity!

BCIS 3680 EXAM 3 STUDY GUIDE

  1. Exception Handling - Answers --intercepting and responding to exceptions 1.1 Be able to describe the following: error, unchecked exception, checked exception, logical error. - Answers - EXCEPTION: generated as the result of an error or an unexpected event.-Throwable class(either error or exception) CHECKED EXCEPTION:
  • compiler will examine your code before compiling. If it finds an issue, your program won't be able to compile until you address it(Java) "passing the buck" = throwing the exception(dodge it) CHECKED EXCEPTION:exceptions occur due to reasons that are not controllable by the programmer - Answers - UNCHECKED EXCEPTION:
  • result of a serious condition that are not under the programmer's control
  • critical errors EX. internal error, run out of memory EX. AWTError, ThreadDeath, VM Error UNCHECKED EXCEPTIONS:-unchecked by compilerRuntimeExceptiontry-catch-finally (result of sloppy programming/ avoided with properly written code) LOGICAL ERRORS: - Answers - programmer errors that won't generate any exceptions in code but will cause logical errors EX. error in variables, method names, data types 1.2 Know the superclass of all exceptions and the major methods that provide information about an exception. - Answers - getMessage()
  • returns a string indicating the cause of the exception. toString()
  • returns a string containing the exception class name and what would be returned by getMessage(). printStackTrace()
  • prints the line number of the code that caused the exception, plus the sequence of method calls leading up to the exception. STACKTRACE=list of all the methods executing. 1.3 Know the rules governing the handling of exceptions. - Answers - EXCEPTION HANDLER:-section of code that gracefully responds to exceptions.

Be able to use correct syntax to write try‐ catch‐finally blocks to handle an exception. - Answers - try Block try { ( statements that may cause an exception ) } =cannot use without catch or finally Block catch Block catch (ExceptionType ParameterName) { ( exception handling statements ) } - Answers --follows try Block

  • must be listed from most specific to most general
  • ExceptionType is the name of an exception class
  • ParameterName is a variable name which will reference the exception object if the code in the try block throws an exception. finally Block finally Block try { (try block statements...) } catch (ExceptionType ParameterName) { (catch block statements...) } finally { (finally block statements...) } - Answers --finally Block executes whether an exception occurs or not. Multiple catch Blocks - Answers - try { // statements that may throw up to N exceptions } catch (Exception1 ex1) { // code for handling Exception

2.2 Command/keystrokes to list existing databases, select which database to work on, list tables in a database, run SQL script files, exit an incomplete SQL statement - Answers - SELECT DATABASE TO WORK: Run: use ; GET OUT A LINE OF COMMAND: /c STRING

  • char() varchar() FLOAT
  • real java.match.BigDecimal DECIMAL(t,d) java.sql.Date DATE - Answers - java datatype to SQL datatype 2.2 Command/keystrokes to list existing databases, list tables in a database, exit an incomplete SQL statement - Answers - CREATE DATABASE: Run: create database forta; LIST DATABASES: Run: show databases; WORK ON DATABASE Run: use forta; CREATE TABLES: Run: source <create_script> LIST TABLES: Run: show tables; EXECUTE SCRIPT Run: source<>; POPULATE SCRIPT Run: source <populate_script> 2 .3 Know the key concepts in database: table, row, column - Answers - TABLE:
  • list of data of a specific type.
  • describes entities with various attributes must have unique name

COLUMN:

  • assigned an SQL data type
  • field = column
  • vertical
  • defines attribute ROWS:
  • all rows have the same number of columns
  • holds records RECORD:
  • stored as a row in one of the tables 2.3 Know the key concepts in database: primary key, foreign key, null. - Answers - NULL:
  • there is no entry, there is nothing there NO NULL:force entry PRIMARY KEY:
  • MUST have unique identifier
  • define field as PK
  • cannot be null
  • must be unchangeable FOREIGN KEY:

2.4 Be able to issue the SQL command to display the schema of a table. - Answers - SCHEMA:

  • stores "meta data"
  • defines datatypes stored in columns ex.text, numbers, currency values, even large blobs of binary information DISPLAY mysql>show columns from visit; What cannot be used as keywords in SQL? - Answers - tables and column names 2.5 Know the SQL syntax for the four basic database operations: retrieve, update, insert, delete. Be proficient in using SELECT statements, including simple join and selecting unique values from a column - Answers - SELECT * FROM profucts WHERE prod_price = 2.50;
  • keywords= SELECT, FROM, and WHERE

protocol:subprotocol:databaseName

  • protocol is the database protocol
  • value is jdbc when using JDBC
  • subprotocol varies depending on the type of DBMS
  • value is derby when using Java DB
  • value is MySQL when using MySQL
  • databaseName is the name of the database STORE AS A CONSTANT VARIABLE: Final String DB_URL = "jdbc:derby:CoffeeDB"; 3.4 Identify the various parts in a connection string and know the characters that connect the parts together. - Answers - CONNECTING CHARACTERS: (:, ?, &, etc.) CONNECTION STRING EX. jdbc:mysql://localhost:3306/forta?user=root&password=bcis jdbc = JDBC protocol - Answers - mysql = Subprotocol for MySQL //localhost = Network notation for the local computer - Answers - 3306 = Default TCP port to receive connection for MySQL. If you have configured a different port, use the number for that port instead. forta = Name of the MySQL database you want to access - Answers - user=root = Specifying the username of the MySQL user account that accesses the database on behalf of the WebApp. In production environments you don't want to use "root". password=bcis3680 = Providing password for the user account used. Note this is visible in your JSP source code. - Answers - 3.5 Be able to use: JDBC Connector, Connection, and Statement. Know the two main methods in to Statement run SQL statements and their return values. - Answers - TO CREATE NETWORK CONNECTION= getConnection() method of the DriverManager class
  • Searches for and loads a compatible JDBC driver for the database specified by the URL.
  • Returns a reference to a Connection object.
  • Throws an SQLException if it fails to load a compatible JDBC driver
  • To make the actual network connection Connection cxn = DriverManager.getConnection(cxnString, Username, Password);
  • cxnString lists the protocol used to access the database If fails to load a compatible JDBC driver ex. error in ResultSet Method - Answers - Throws an SQLException ISSUE SQL STATEMENTS - Answers - To issue SQL statements to the DBMS, you need a Statement object Statement stm = cxn.createStatement(); SQL STATEMENTS THAT MODIFY DATABASE (creating, deleting, or updating rows in tables) - Answers - executeUpdate() VALUE RETURNING METHOD: String sql = "CREATE TABLE product " + "(productID char(5), name varchar(15))"; int result = stm.executeUpdate(sql); SQL STATEMENT DOES NOT MODIFY DATABASE(retrieving data from tables) - Answers - executeQuery() String sql = "SELECT * FROM customers"; ResultSet rs = stm.executeQuery(sql); value-returning method returns a ResultSet 3.6 Describe how the next() method in the ResultSet class works and when it returns true or false. - Answers --The ResultSet class has a next() method.
  • Each call to next() moves the cursor forward by one row
  • Call the next() method to move the cursor into the rows in the ResultSet to read data. Each call to next()moves the cursor forward
  • BOOLEAN true=moved to readable row false=NO readable DATA nothing=no readable to data, but you can still next() MAKE ResultSet - Answers --change its behavior to scrollable or insensitive
  • front end
  1. BUSINESS LOGIC TIER (-build classes that handles data access
  • the "bridge" between the UI and Data tiers.
  • Classes in this tier can query and run other DB operations)
  1. DATA TIER (data actually resides. Queries/operations are run on them by the Statement object from the class in the middle tier)
  • backend
  • Modern enterprise applications ADVANTAGES OF THREE-TIER - Answers --can be MODIFIED without impacting the other tiers
  • Better REUSABILITY and flexibility when well-designed classes are standardized
  • Better SCALABILITY to grow and fit new demands
  • define and achieve DIVISION OF LABOR between IT staff with different expertise What is the maximum number of finally blocks that you can write? - Answers - One for each try block All exceptions are subclasses of the ____________ class. - Answers - Throwable To loop through the records retrieved by a query, you can use the next() method of the ____________ object. - Answers - ResultSet Suppose that a String variable cs has been created to store the correct connection string to a database and that a Connection object cxn has been properly instantiated. WHICH OF THE FOLLOWING CREATES A STATEMENT OBJECT? - Answers - Statement stm = cxn.createStatement(); To run an SQL SELECT command, you want to call the ____________ method of the Statement object. Group of answer choices - Answers - executeQuery()