SlideShare a Scribd company logo
1 of 13
Question 1 1 pts Skip to question text.
As part of a bank account implementation, there is an account
class and a checking account class. These two classes should be
related by:
polymorphism
abstract classes
both composition and inheritance
inheritance
composition
Flag this Question
Question 2 1 pts
When using OOP, which of the following terms refers to a
mechanism for a behavior, basically how it’s implemented?
composition
inheritance
polymorphism
dynamic binding
Flag this Question
Question 3 1 pts
To access an element in an Array object,
Use the ArrayList's get() method.
Use the ArrayList's element() method.
Individual elements in an ArrayList can’t be accessed without
doing a sequential query getSequential(), returning every
element up to and including the element requested.
Use square brackets around an index value.
Flag this Question
Question 4 1 pts
To access an element in an ArrayList object,
Use square brackets around an index value.
Use the ArrayList element() method.
Use the ArrayList get() method.
Individual elements in an ArrayList can’t be accessed without
doing a sequential query getSequential(), returning every
element up to and including the element requested.
Flag this Question
Question 5 1 pts
What term below is defined as a message that tells the program
that something has happened?
an interaction
a listener
an action
an event
Flag this Question
Question 6 1 pts
Which item below is defined as an object?
A String
An Array
All of the above
An ArrayList
Flag this Question
Question 7 1 pts
When a text-box-enter event occurs, which method and
parameter are required to handle this type of action? (1 point)
actionEvent with an actionperformed parameter
actionListener with an interfaceID parameter
windowListener with an eventID parameter
actionPerformed with an actionEvent parameter
Flag this Question
Question 8 1 pts
Which class includes the setTitle and setSize methods?
JFrame
JWindow
JBox
JOptionpane
Flag this Question
Question 9 1 pts
Before utilizing the binary search method, __________ must be
done to the array?
indexing
splitting
sorting
importing
Flag this Question
Question 10 1 pts
Which layout manager implements a one-compartment layout
scheme?
GridlessLayout
GridBagLayout
GridLayout
FlowLayout
BorderLayout
Flag this Question
Question 11 1 pts
What is the default layout manager for a JFrame window?
GridBagLayout
GridLayout
FlowLayout
GridlessLayout
BorderLayout
Flag this Question
Question 12 1 pts
To call the superclass constructor, super() must be the first line
in a constructor.
True
False
Flag this Question
Question 13 1 pts
Method overriding is when a method has the same name, same
sequence of parameter types, and the same return type as a
method in a superclass.
True
False
Flag this Question
Question 14 1 pts
Type casting, also known as promotion is considered an implicit
conversion.
True
False
Flag this Question
Question 15 1 pts
An abstract method declaration should always be defined as
public as it is meant to be inherited into a subclass to be
correctly used.
True
False
Flag this Question
Question 16 1 pts
When using parseInt() to convert a string to a number,
NumberFormatException is thrown if a non-integer argument is
found.
True
False
Flag this Question
Question 17 1 pts
enableEdit() is used to allow a user to edit the contents of a
JTextField.
True
False
Flag this Question
Question 18 1 pts
Write the statement to print to the screen the 6th element of the
array defined below?
Integer [ ] priceList = new Integer [10];
Keyboard Shortcuts
p
Flag this Question
Question 19 1 pts
Declare and initialize an ArrayList of type Double and call this
ArrayList stocks.
Keyboard Shortcuts
p
Flag this Question
Question 20 1 pts
Write the code on a single line to display the dialog box below.
Error! Filename not specified.
Keyboard Shortcuts
p
Flag this Question
Question 21 1 pts Skip to question text.
Write the code on a single line to display the input box below.
Save the results into a variable called “input".
Error! Filename not specified.
Keyboard Shortcuts
p
Flag this Question
Question 22 4 pts Skip to question text.
Declare (do not initialize) two arrays:
1. One array called “myNumbers” will hold the values: 1.23,
3.14, 5.18, 82, 2.56. The array should not have any additional
empty elements.
2. One array called “myNames” will hold the values: Tom, Bob,
John, Steve. The array should not have any additional empty
elements.
Proper syntax is required
Keyboard Shortcuts
p
Flag this Question
Question 23 2 pts Skip to question text.
Assume that this code fragment compiles and runs. What is its
output? As always, be precise when showing your output.
public static void main(String [] args)
{
int x = 3;
int xf = 0;
if (x == 0 || x == 1)
{
xf = 1;
}
else
{
xf = 1;
for (int i=2; i<=x; i++)
{
xf *= i;
}
}
System.out.println("Results are: " + xf);
Keyboard Shortcuts
p
Flag this Question
Question 24 2 pts Skip to question text.
Assume that this program compiles and runs. Assume that the
user enters 5 6 (separated by a space) for input. What is the
output? As always, be precise when showing your output.
import java.util.Scanner;
public class TryCatchQuestion
{
public static void main(String [] args)
{
Scanner stdIn = new Scanner(System.in);
System.out.println("Please enter 2 numbers seperated by a
space");
try
{
System.out.println("Output: " + stdIn.nextInt() /
stdIn.nextInt());
}
catch (NumberFormatException e)
{
System.out.println("Number Format Exception");
}
catch (ArithmeticException e)
{
System.out.println("Division by zero");
}
catch (Exception e)
{
System.out.println("Other Exception");
}
}//end main
}//end TryCatchQuestion
Keyboard Shortcuts
p
Flag this Question
Question 25 2 pts Skip to question text.
Assume that this program compiles and runs. Assume that the
user enters 5 0 (separated by a space) for input. What is the
output? As always, be precise when showing your output.
import java.util.Scanner;
public class TryCatchQuestion
{
public static void main(String [] args)
{
Scanner stdIn = new Scanner(System.in);
System.out.println("Please enter 2 numbers seperated by a
space");
try
{
System.out.println("Output: " + stdIn.nextInt() /
stdIn.nextInt());
}
catch (NumberFormatException e)
{
System.out.println("Number Format Exception");
}
catch (ArithmeticException e)
{
System.out.println("Division by zero");
}
catch (Exception e)
{
System.out.println("Other Exception");
}
}//end main
}//end TryCatchQuestion
Keyboard Shortcuts
p
Flag this Question
Question 26 2 pts Skip to question text.
Assume that this program compiles and runs. Assume that the
user enters 5 six (separated by a space) for input. What is the
output? As always, be precise when showing your output.
import java.util.Scanner;
public class TryCatchQuestion
{
public static void main(String [] args)
{
Scanner stdIn = new Scanner(System.in);
System.out.println("Please enter 2 numbers seperated by a
space");
try
{
System.out.println("Output: " + stdIn.nextInt() /
stdIn.nextInt());
}
catch (NumberFormatException e)
{
System.out.println("Number Format Exception");
}
catch (ArithmeticException e)
{
System.out.println("Division by zero");
}
catch (Exception e)
{
System.out.println("Other Exception");
}
}//end main
}//end TryCatchQuestion
Keyboard Shortcuts
p
Flag this Question
Question 27 3 pts Skip to question text.
Provide code that adds "Hello!" and "Goodbye." messages to the
JFrame window so that the resulting window looks like this:
Error! Filename not specified.
You may assume that the JFrame window has been created using
its default layout manager. Provide only two statements – one
statement creates "Hello!" and adds it to the window and one
statement creates "Goodbye." and adds it to the window. Do not
provide extra code. In particular, you should not provide code
for window settings (size, title, etc.), and you should not
provide code for a listener. (3 points)
Keyboard Shortcuts
p
Flag this Question
Question 28 14 pts Skip to question text.
Provide the code for a class called Coin.java that implements
the main method provided below.
public static void main(String [] args)
{
Coin toss = new Coin();
for (int x = 0; x < 1000; x++)
toss.flip();
Coin.results();
}//end main
When the program runs, the following random output should be
produced: (numbers will vary as are random)
Heads: 494
Tails: 506
Program specific requirements:
· Style is require but comments are NOT required. 1 pt
· Include appropriate import statements for your file. 1 pt
· Utilize a constant class array to hold “Heads” and “Tails” 1 pt
· Declare a class ArrayList called flips that will hold integer
values, 0 for heads and 1 for tails 1 pt
· Create a flips method that performs the following: 4 pts
· Initializes an instance of the Random class and a random
variable
· Stores a random variable either 0 or 1
· Store the random number in the flips ArrayList
· Create a results method that performs the following: 6 pts
· Declare variable to hold number of heads flipped
· Utilize a for loop to iterate through the ArrayList (do NOT
hard code the size here)
· For each iteration, increment the result from the ArrayList into
a variable called heads
· Output the number of Heads using the constant array for the
“Heads” heading along with the number of heads flipped
· Output the number of Tails using the constant array for the
“Tails” heading along with the number of tails calculated from
the size of the array minus the number of heads

More Related Content

Similar to Question 1 1 pts Skip to question text.As part of a bank account.docx

Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningCarol McDonald
 
9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03Terry Yoast
 
9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03Terry Yoast
 
stacks and queues class 12 in c++
stacks and  queues class 12 in c++stacks and  queues class 12 in c++
stacks and queues class 12 in c++Khushal Mehta
 
Devry CIS 355A Full Course Latest
Devry CIS 355A Full Course LatestDevry CIS 355A Full Course Latest
Devry CIS 355A Full Course LatestAtifkhilji
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxmydrynan
 
Esoft Metro Campus - Certificate in java basics
Esoft Metro Campus - Certificate in java basicsEsoft Metro Campus - Certificate in java basics
Esoft Metro Campus - Certificate in java basicsRasan Samarasinghe
 
Java method present by showrov ahamed
Java method present by showrov ahamedJava method present by showrov ahamed
Java method present by showrov ahamedMd Showrov Ahmed
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysDevaKumari Vijay
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureJayaram Sankaranarayanan
 
Java language fundamentals
Java language fundamentalsJava language fundamentals
Java language fundamentalsKapish Joshi
 
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxmaxinesmith73660
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07Terry Yoast
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07Terry Yoast
 
object oriented programming java lectures
object oriented programming java lecturesobject oriented programming java lectures
object oriented programming java lecturesMSohaib24
 
Reading and writting v2
Reading and writting v2Reading and writting v2
Reading and writting v2ASU Online
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Udayan Khattry
 

Similar to Question 1 1 pts Skip to question text.As part of a bank account.docx (20)

Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 
9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03
 
9781111530532 ppt ch03
9781111530532 ppt ch039781111530532 ppt ch03
9781111530532 ppt ch03
 
stacks and queues class 12 in c++
stacks and  queues class 12 in c++stacks and  queues class 12 in c++
stacks and queues class 12 in c++
 
Devry CIS 355A Full Course Latest
Devry CIS 355A Full Course LatestDevry CIS 355A Full Course Latest
Devry CIS 355A Full Course Latest
 
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docxFaculty of ScienceDepartment of ComputingFinal Examinati.docx
Faculty of ScienceDepartment of ComputingFinal Examinati.docx
 
Esoft Metro Campus - Certificate in java basics
Esoft Metro Campus - Certificate in java basicsEsoft Metro Campus - Certificate in java basics
Esoft Metro Campus - Certificate in java basics
 
Java method present by showrov ahamed
Java method present by showrov ahamedJava method present by showrov ahamed
Java method present by showrov ahamed
 
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arraysUnit 2-data types,Variables,Operators,Conitionals,loops and arrays
Unit 2-data types,Variables,Operators,Conitionals,loops and arrays
 
Java Lab Manual
Java Lab ManualJava Lab Manual
Java Lab Manual
 
Beyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software ArchitectureBeyond PITS, Functional Principles for Software Architecture
Beyond PITS, Functional Principles for Software Architecture
 
Java language fundamentals
Java language fundamentalsJava language fundamentals
Java language fundamentals
 
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
 
core java
 core java core java
core java
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07
 
9781111530532 ppt ch07
9781111530532 ppt ch079781111530532 ppt ch07
9781111530532 ppt ch07
 
object oriented programming java lectures
object oriented programming java lecturesobject oriented programming java lectures
object oriented programming java lectures
 
Reading and writting v2
Reading and writting v2Reading and writting v2
Reading and writting v2
 
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
Oracle Certified Associate (OCA) Java SE 8 Programmer II (1Z0-809) - Practice...
 
Java programming-examples
Java programming-examplesJava programming-examples
Java programming-examples
 

More from amrit47

APA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxAPA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxamrit47
 
APA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxAPA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxamrit47
 
Apa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxApa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxamrit47
 
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxAPA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxamrit47
 
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
APA format     httpsapastyle.apa.orghttpsowl.purd.docxAPA format     httpsapastyle.apa.orghttpsowl.purd.docx
APA format  httpsapastyle.apa.orghttpsowl.purd.docxamrit47
 
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxAPA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxamrit47
 
APA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxAPA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxamrit47
 
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxAPA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxamrit47
 
APA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxAPA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxamrit47
 
APA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxAPA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxamrit47
 
Appearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxAppearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxamrit47
 
apa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxapa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxamrit47
 
APA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxAPA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxamrit47
 
APA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxAPA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxamrit47
 
APA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxAPA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxamrit47
 
APA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxAPA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxamrit47
 
APA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxAPA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxamrit47
 
APA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxAPA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxamrit47
 
APA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxAPA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxamrit47
 
APA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxAPA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxamrit47
 

More from amrit47 (20)

APA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docxAPA, The assignment require a contemporary approach addressing Race,.docx
APA, The assignment require a contemporary approach addressing Race,.docx
 
APA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docxAPA style and all questions answered ( no min page requirements) .docx
APA style and all questions answered ( no min page requirements) .docx
 
Apa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docxApa format1-2 paragraphsreferences It is often said th.docx
Apa format1-2 paragraphsreferences It is often said th.docx
 
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docxAPA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
APA format2-3 pages, double-spaced1. Choose a speech to review. It.docx
 
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
APA format     httpsapastyle.apa.orghttpsowl.purd.docxAPA format     httpsapastyle.apa.orghttpsowl.purd.docx
APA format  httpsapastyle.apa.orghttpsowl.purd.docx
 
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docxAPA format2-3 pages, double-spaced1. Choose a speech to review. .docx
APA format2-3 pages, double-spaced1. Choose a speech to review. .docx
 
APA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docxAPA Formatting AssignmentUse the information below to create.docx
APA Formatting AssignmentUse the information below to create.docx
 
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docxAPA style300 words10 maximum plagiarism  Mrs. Smith was.docx
APA style300 words10 maximum plagiarism  Mrs. Smith was.docx
 
APA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docxAPA format1. What are the three most important takeawayslessons.docx
APA format1. What are the three most important takeawayslessons.docx
 
APA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docxAPA General Format Summary APA (American Psychological.docx
APA General Format Summary APA (American Psychological.docx
 
Appearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docxAppearance When I watched the video of myself, I felt that my b.docx
Appearance When I watched the video of myself, I felt that my b.docx
 
apa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docxapa format1-2 paragraphsreferencesFor this week’s .docx
apa format1-2 paragraphsreferencesFor this week’s .docx
 
APA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docxAPA Format, with 2 references for each question and an assignment..docx
APA Format, with 2 references for each question and an assignment..docx
 
APA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docxAPA-formatted 8-10 page research paper which examines the potential .docx
APA-formatted 8-10 page research paper which examines the potential .docx
 
APA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docxAPA    STYLE 1.Define the terms multiple disabilities and .docx
APA    STYLE 1.Define the terms multiple disabilities and .docx
 
APA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docxAPA STYLE  follow this textbook answer should be summarize for t.docx
APA STYLE  follow this textbook answer should be summarize for t.docx
 
APA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docxAPA7Page length 3-4, including Title Page and Reference Pag.docx
APA7Page length 3-4, including Title Page and Reference Pag.docx
 
APA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docxAPA format, 2 pagesThree general sections 1. an article s.docx
APA format, 2 pagesThree general sections 1. an article s.docx
 
APA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docxAPA Style with minimum of 450 words, with annotations, quotation.docx
APA Style with minimum of 450 words, with annotations, quotation.docx
 
APA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docxAPA FORMAT1.  What are the three most important takeawayslesson.docx
APA FORMAT1.  What are the three most important takeawayslesson.docx
 

Recently uploaded

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 

Recently uploaded (20)

APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 

Question 1 1 pts Skip to question text.As part of a bank account.docx

  • 1. Question 1 1 pts Skip to question text. As part of a bank account implementation, there is an account class and a checking account class. These two classes should be related by: polymorphism abstract classes both composition and inheritance inheritance composition Flag this Question Question 2 1 pts When using OOP, which of the following terms refers to a mechanism for a behavior, basically how it’s implemented? composition inheritance polymorphism dynamic binding Flag this Question Question 3 1 pts To access an element in an Array object,
  • 2. Use the ArrayList's get() method. Use the ArrayList's element() method. Individual elements in an ArrayList can’t be accessed without doing a sequential query getSequential(), returning every element up to and including the element requested. Use square brackets around an index value. Flag this Question Question 4 1 pts To access an element in an ArrayList object, Use square brackets around an index value. Use the ArrayList element() method. Use the ArrayList get() method. Individual elements in an ArrayList can’t be accessed without doing a sequential query getSequential(), returning every element up to and including the element requested. Flag this Question Question 5 1 pts What term below is defined as a message that tells the program that something has happened? an interaction a listener
  • 3. an action an event Flag this Question Question 6 1 pts Which item below is defined as an object? A String An Array All of the above An ArrayList Flag this Question Question 7 1 pts When a text-box-enter event occurs, which method and parameter are required to handle this type of action? (1 point) actionEvent with an actionperformed parameter actionListener with an interfaceID parameter windowListener with an eventID parameter actionPerformed with an actionEvent parameter Flag this Question Question 8 1 pts Which class includes the setTitle and setSize methods?
  • 4. JFrame JWindow JBox JOptionpane Flag this Question Question 9 1 pts Before utilizing the binary search method, __________ must be done to the array? indexing splitting sorting importing Flag this Question Question 10 1 pts Which layout manager implements a one-compartment layout scheme? GridlessLayout GridBagLayout GridLayout
  • 5. FlowLayout BorderLayout Flag this Question Question 11 1 pts What is the default layout manager for a JFrame window? GridBagLayout GridLayout FlowLayout GridlessLayout BorderLayout Flag this Question Question 12 1 pts To call the superclass constructor, super() must be the first line in a constructor. True False Flag this Question Question 13 1 pts Method overriding is when a method has the same name, same sequence of parameter types, and the same return type as a method in a superclass.
  • 6. True False Flag this Question Question 14 1 pts Type casting, also known as promotion is considered an implicit conversion. True False Flag this Question Question 15 1 pts An abstract method declaration should always be defined as public as it is meant to be inherited into a subclass to be correctly used. True False Flag this Question Question 16 1 pts When using parseInt() to convert a string to a number, NumberFormatException is thrown if a non-integer argument is found. True False Flag this Question Question 17 1 pts enableEdit() is used to allow a user to edit the contents of a
  • 7. JTextField. True False Flag this Question Question 18 1 pts Write the statement to print to the screen the 6th element of the array defined below? Integer [ ] priceList = new Integer [10]; Keyboard Shortcuts p Flag this Question Question 19 1 pts Declare and initialize an ArrayList of type Double and call this ArrayList stocks. Keyboard Shortcuts p Flag this Question Question 20 1 pts Write the code on a single line to display the dialog box below. Error! Filename not specified. Keyboard Shortcuts p Flag this Question Question 21 1 pts Skip to question text. Write the code on a single line to display the input box below. Save the results into a variable called “input". Error! Filename not specified. Keyboard Shortcuts
  • 8. p Flag this Question Question 22 4 pts Skip to question text. Declare (do not initialize) two arrays: 1. One array called “myNumbers” will hold the values: 1.23, 3.14, 5.18, 82, 2.56. The array should not have any additional empty elements. 2. One array called “myNames” will hold the values: Tom, Bob, John, Steve. The array should not have any additional empty elements. Proper syntax is required Keyboard Shortcuts p Flag this Question Question 23 2 pts Skip to question text. Assume that this code fragment compiles and runs. What is its output? As always, be precise when showing your output. public static void main(String [] args) { int x = 3; int xf = 0; if (x == 0 || x == 1) { xf = 1; } else { xf = 1; for (int i=2; i<=x; i++) { xf *= i; } }
  • 9. System.out.println("Results are: " + xf); Keyboard Shortcuts p Flag this Question Question 24 2 pts Skip to question text. Assume that this program compiles and runs. Assume that the user enters 5 6 (separated by a space) for input. What is the output? As always, be precise when showing your output. import java.util.Scanner; public class TryCatchQuestion { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); System.out.println("Please enter 2 numbers seperated by a space"); try { System.out.println("Output: " + stdIn.nextInt() / stdIn.nextInt()); } catch (NumberFormatException e) { System.out.println("Number Format Exception"); } catch (ArithmeticException e) { System.out.println("Division by zero"); } catch (Exception e) { System.out.println("Other Exception"); } }//end main }//end TryCatchQuestion
  • 10. Keyboard Shortcuts p Flag this Question Question 25 2 pts Skip to question text. Assume that this program compiles and runs. Assume that the user enters 5 0 (separated by a space) for input. What is the output? As always, be precise when showing your output. import java.util.Scanner; public class TryCatchQuestion { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); System.out.println("Please enter 2 numbers seperated by a space"); try { System.out.println("Output: " + stdIn.nextInt() / stdIn.nextInt()); } catch (NumberFormatException e) { System.out.println("Number Format Exception"); } catch (ArithmeticException e) { System.out.println("Division by zero"); } catch (Exception e) { System.out.println("Other Exception"); } }//end main }//end TryCatchQuestion Keyboard Shortcuts
  • 11. p Flag this Question Question 26 2 pts Skip to question text. Assume that this program compiles and runs. Assume that the user enters 5 six (separated by a space) for input. What is the output? As always, be precise when showing your output. import java.util.Scanner; public class TryCatchQuestion { public static void main(String [] args) { Scanner stdIn = new Scanner(System.in); System.out.println("Please enter 2 numbers seperated by a space"); try { System.out.println("Output: " + stdIn.nextInt() / stdIn.nextInt()); } catch (NumberFormatException e) { System.out.println("Number Format Exception"); } catch (ArithmeticException e) { System.out.println("Division by zero"); } catch (Exception e) { System.out.println("Other Exception"); } }//end main }//end TryCatchQuestion Keyboard Shortcuts p
  • 12. Flag this Question Question 27 3 pts Skip to question text. Provide code that adds "Hello!" and "Goodbye." messages to the JFrame window so that the resulting window looks like this: Error! Filename not specified. You may assume that the JFrame window has been created using its default layout manager. Provide only two statements – one statement creates "Hello!" and adds it to the window and one statement creates "Goodbye." and adds it to the window. Do not provide extra code. In particular, you should not provide code for window settings (size, title, etc.), and you should not provide code for a listener. (3 points) Keyboard Shortcuts p Flag this Question Question 28 14 pts Skip to question text. Provide the code for a class called Coin.java that implements the main method provided below. public static void main(String [] args) { Coin toss = new Coin(); for (int x = 0; x < 1000; x++) toss.flip(); Coin.results(); }//end main When the program runs, the following random output should be produced: (numbers will vary as are random) Heads: 494 Tails: 506 Program specific requirements: · Style is require but comments are NOT required. 1 pt · Include appropriate import statements for your file. 1 pt · Utilize a constant class array to hold “Heads” and “Tails” 1 pt · Declare a class ArrayList called flips that will hold integer
  • 13. values, 0 for heads and 1 for tails 1 pt · Create a flips method that performs the following: 4 pts · Initializes an instance of the Random class and a random variable · Stores a random variable either 0 or 1 · Store the random number in the flips ArrayList · Create a results method that performs the following: 6 pts · Declare variable to hold number of heads flipped · Utilize a for loop to iterate through the ArrayList (do NOT hard code the size here) · For each iteration, increment the result from the ArrayList into a variable called heads · Output the number of Heads using the constant array for the “Heads” heading along with the number of heads flipped · Output the number of Tails using the constant array for the “Tails” heading along with the number of tails calculated from the size of the array minus the number of heads