How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask ATLProg Your Own Question

ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8649
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

Java Programming homework essay questions1. Your program

Resolved Question:

Java Programming homework /essay questions


 


1.  (TCO 6) To retrieve the number of items in a Choice menu, use the _____ method. (Points : 4) 


       getCount()


        getItemCount()


        length


        length()


 


2.  (TCO 6) Which of the following is not a GUI component (control or widget)? (Points : 4) 


       String


        Button


        Menu


        Combo box


 


3.  (TCO 6) _____ components do not create native controls, as do the _____ controls. (Points : 4) 


       AWT, Swing


        Swing, AWT


        Java, Swing


        Java, AWT


 


4.  (TCO 6) A(n) _____ is the term used to specify a class that instantiates other classes and calls appropriate methods. (Points : 4) 


       driver class


        external class


        instance class


        superclass


 


5.  (TCO 2) One of the features of the _____ layout manager includes the specification of number of rows and columns (Points : 4) 


       FlowLayout


        BorderLayout


        GridLayout


        CardLayout


        GridBagLayout


 


6.  (TCO 2) Which of the following statements creates a two-dimensional array with 4 rows and 3 columns? (Points : 4) 


       int[][] myTable = new int[4][3];


        int myTable[] = new int[3][4];


        int[][] myTable = new int[3][4];


        int[] myTable = new int[4][3];


 


7.  (TCO 2) The mechanism(s) for handling an event, involve _____. (Points : 4) 


       event source


        event object


        event listener


        All of the above


 


8.  (TCO 2) The first parameter in the for statement is a(n) _____. (Points : 4) 


       assignment statement


        conditional statement


        decrement operator


        increment operator


 


 


9.  (TCO 5) In a SQL statement, placeholders are represented by _____ characters to allow the same prepared statement to be used with different parameters values each time it is executed. (Points : 4) 


       ?


        &


        !


        $


 


 


10.  (TCO 5) _____ is simply the conversion of an object into a stream. (Points : 4) 


       Implementation


        Serialization


        Persistence


        Deserialization


 


     


 


 


 


11.  (TCO 5) _____ is a common language composed of statements to manipulate a database. (Points : 4) 


       Classes


        Java


        SQL


        Query


 


12.  (TCO 5) The _____ of a relationship is described as one-to-one, one-to-many, or many-to-many, depending on the number of records in a table that may relate to a given record in another table. (Points : 4) 


       cardinality


        normalization


        association


        relationship


 


13.  (TCO 5) Manipulating data in a database efficiently and establish relationships between tables, it is necessary to establish a(n) _____ per table. (Points : 4) 


       sequence


        association


        relation


        index


 


      14.  (TCO 5) _____ is an association between fields. (Points : 4) 


       Cardinality


        Normalization


        Association


        Relationship


 


15.  (TCO 5) _____ is the ability of an object, including its state, to be saved over time, allowing the object to be restored later. (Points : 4) 


       Implementation


        Serialization


        Persistence


        Deserialization


 


 


16.  (TCO 6) A constructor for a Dimension object takes _____ argument(s). (Points : 4) 


       one integer


        one integer array


        two integer


        two float


 


 


17.  (TCO 6) The setBold() and setFontSize() methods belong to the _____ class. (Points : 4) 


       Attribute


        AttributeSet


        Style


        StyleConstants


 


 


18.  (TCO 6) When a mnemonic key is assigned to a letter in the command’s keyword, pressing _____ will trigger the menu command. (Points : 4) 


       ALT+the letter


        the letter


        CTRL+the letter


        SHIFT+the letter


 


 


19.  (TCO 6) The _____ method creates a tool tip. (Points : 4) 


       setTool()


        setToolText()


        setToolTip()


        setToolTipText()


 


 


20.  (TCO 7) 01000001 is an example of a(n) _____. (Points : 4) 


       bit


        byte


        field


        record


 


     


21.  (TCO 7) The _____ package contains a collection of file and stream classes that support reading and writing data. (Points : 4) 


       java.io


        java.file


        java.text


        java.stream


 


     


22.  (TCO 7) The panels, labels, and text fields of the BillPayer class are constructed _____. (Points : 4) 


       within the constructor method


        in the main() method


        in a programmer-defined method


        as class-scope declarations


 


 


23.  (TCO 7) What does the first argument to the FlowLayout constructor specify? (Points : 4) 


       Vertical placement


        Horizontal placement


        Alignment


        Background color


 


 


24.  (TCO 6) The _____ method is not a member of the String class. (Points : 4) 


       append()


        charAt()


        length()


        substring()


 


 


25.  (TCO 6) A method signature consists of _____. (Points : 4) 


       the method name


        the formal parameters


        the return type, method name, and formal parameters


        the method name and formal parameters


 


     


26.  (TCO 6) Although the return type of a mutator method is typically void, sometimes it is a(n) _____ so that the method can indicate whether the proposed change was accepted. (Points : 4) 


       boolean


        char


        int


        String


 


      


27.  (TCO 6) Which of the following Collection interfaces can contain duplicates? (Points : 4) 


       List


        Map


        SortedMap


        Set


 


28.  (TCO 6) _____ is an implementation of a Collections Framework interface, which is a list implemented as an array. (Points : 4) 


       ArrayList


        LinkedList


        HashMap


        SortedSet


    


 


29.  (TCO 6) The _____ is a routine provided by the JVM that frees previously allocated memory for objects which are no longer in use. (Points : 4) 


       free memory


        garbage collector


        memory heap


        object collector  


     


30.  (TCO 6) If a method does not handle a potential exception, it claims the exception by _____. (Points : 4) 


       using the keyword, throws, as a method modifier


        placing the Exception type in the method header parameter list


        placing the keyword, throws, followed by the Exception type, in the method header


        placing the Exception type in the method header return type 


 


 


Short answer /essay questions


 


1. Your program is running without an error, but produces strange results when the user clicks a button Calculate. You suspect that you have made a logical error in a method that defines action for this button. Explain how you would set up watch variables.


 


2. Java has different types of exceptions, including the I/O exceptions, run-time exceptions, and checked exceptions. Explain the difference between these types of exceptions and give an example of when each one may occur.


 


3. Java has different types of exceptions, including the I/O exceptions, run-time exceptions, and checked exceptions. Explain the difference between these types of exceptions and give an example of when each one may occur.


 


 


 


4.  You have in your program an ArrayList that contains employee salaries (double type) in arbitrary order. You need to display the employees’ salaries ordered in descending order. Provide detailed steps how you plan to accomplish this task. You do not need to give correct Java code (a detailed pseudocode is sufficient) but indicate which method(s) and which Java class(es) you would use. 


 


5. Suppose that you have an array of baseball scores (type integer) called Scores. The values in the array are ordered from largest to smallest. You need to find the average score, and how many scores are less or equal to the average, and how many are greater than the average. Write a code fragment to accomplish it, or at the very least write a detailed plan (pseudocode).


 


6.  Do we need to format our program output? Does formatting only apply to numeric values? What about percent values and currencies? Give an example that uses the NumberFormat class in the java.text package that formats percent values.


 


7. Classes and objects are the fundamental concepts of object-oriented programming language. What are classes and objects? Explain the relationship between a class and an object. 

Submitted: 1 year ago.
Category: Homework
Expert:  ATLProg replied 1 year ago.
Hello Welcome. Thank you for your question, I’m ATLProg and I’ll try to help you.

How soon do you need this answer ?

Customer: replied 1 year ago.

For ATLProg only



 


Hello,


 


Thank you for responding. To be honest, I have around 2 hours 20 minutes left. I hope that is enough time. Also, I had one more question that for some reason didn't make it there with the others.








13. (TCO 4) Consider the array:
s[ 0 ] = 7
s[ 1 ] = 0
s[ 2 ] = -12
s[ 3 ] = 9
s[ 4 ] = 10
s[ 5 ] = 3
s[ 6 ] = 6
The value of s[ s[ 6 ] - s[ 5 ] ] is
(Points : 4)

0
3
9
0




 

Expert:  ATLProg replied 1 year ago.
So we have 30 multiple choice and 7 essay questions ?
Expert:  ATLProg replied 1 year ago.
I have sent a Underpriced report on this to your registered email id, please confirm if the price looks ok to you. Please let me know so I can start working on this accordingly.
Customer: replied 1 year ago.

For ATLProg only


 


 


Hello, again, I'm not sure if you received my last response, but I replied asking if you could send me 2 modified price amounts. (1) For only the 7 short essay questions and (2) for multiple choice questions #16 through #30 completed along with the 7 short essay questions?


 


Thanks

Expert:  ATLProg replied 1 year ago.
No I did not receive it...the essay questions at 90 and rest is for multiple choice ques..
Customer: replied 1 year ago.

For ATLProg only,


 


 


I did not realize that you didn't receive my response and now that more time has passed, I do not want there to be any issues preventing you from completing it within the timeframe. Therefore, if you could at least answer the essay questions and I will adjust the amount.


 


 


Thanks again!

Expert:  ATLProg replied 1 year ago.
ok..so just essay questions at price of 90...agreed ?
Customer: replied 1 year ago.

For ATLProg only,

I'm not sure how to set the amount to 90, this is my first time using this website. I see preset value amounts, but none of them match 90.

Expert:  ATLProg replied 1 year ago.
Thats fine, Please add the difference of amounts as agreed upon as bonus/tip when you Rate answer. You should see abutton add bonus/tip once you rate answer.
Customer: replied 1 year ago.

For ATLProg only,


 


 


 


Okay, I'll add the difference as bonus/tip.

Expert:  ATLProg replied 1 year ago.
Ok, Are you sure you don't need any help for multiple choice questions ?

I am very close to finishing up essay questions..
Customer: replied 1 year ago.

For ATLProg only,


 


Thanks for the offer, however, I had not anticipated that your asking price for the short essays alone would start at 90. That coupled with the time that has elapsed since my initial posting of the question has been taken into consideration. I won't impose on you any more than you'd be willing to assist me with.


Expert:  ATLProg replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 8649
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
ATLProg and 9 other Homework Specialists are ready to help you
Customer: replied 1 year ago.

For ATLProg only,


 


 


 


When I clicked on the download link, this is the message I received:


Error: getaddrinfo ENOENT at errnoException (dns.js:31:11) at Object.onanswer [as oncomplete] (dns.js:140:16)


 


 


The link did not work.

Expert:  ATLProg replied 1 year ago.
let me upload again
Expert:  ATLProg replied 1 year ago.

Try this link ... Download Answer Link or just copy paste this link in your browser window...

http://ge.tt/api/1/files/9bg4Jze/0/blob?download

Customer: replied 1 year ago.

For ATLProg Only,


 


 


 


I was able to view that link, however, I realized that #3 was not the right question, as I noticed that your response was "same as #2" if possible would you be able to answer that question:

This was supposed to be the #3 question:


3. Give an example of an if-else statement. Give an example of a switch-case statement. Explain when using a switch-case would be more appropriate than using an if-else and vice versa. (Points : 11)

Expert:  ATLProg replied 1 year ago.
Here you go...updated document ..

Answer Link
Customer: replied 1 year ago.

For ATLProg only,


 


 


I seem to be having issues with that updated link too. It displayed a message that stated "No data received".

Expert:  ATLProg replied 1 year ago.
Try copy pasting this link... http://ge.tt/api/1/files/3ConKze/0/blob?download

Lemme know if it works
Customer: replied 1 year ago.

For ATLProg only,


 


 


I tried copying and pasting that link in google chrome and IE and it is not working.

Expert:  ATLProg replied 1 year ago.
Thats ok.,..sorry for inconvenience... I will just copy paste it here..



int age = 20;
if(age<18){
System.out.println("You are underage");
}else {
System.out.println("You are not underage");
}

int day = 1;
switch(day){
case 1: System.out.println("Monday");break;
case 2: System.out.println("Tuesday");break;
case 3: System.out.println("Wednesday");break;
case 4: System.out.println("Thursay");break;
case 5: System.out.println("Friday");break;
case 6: System.out.println("Saturday");break;
case 6: System.out.println("Sunday");break;
default: System.out.println("Incorrect Day");break;
}


We should use switch statements if we have multiple choices. It makes the code easier to read. Swtich statements are more efficient
If else is definately better when we have limited number of conditions and its the only option when deadling with non integer or enum conditions as switch
only supports integer and enum conditions

Customer: replied 1 year ago.

For ATLProg only,


 


 


I rated you and hope you received everything and thanks again for your assistance!

Expert:  ATLProg replied 1 year ago.
Yes I did...You are welcome...Pls let me know if I can assist with anything else .

Please start your question text with "For ATLProg Only" to request me again, next time you need help!
http://www.justanswer.com/homework/expert-atlprog/ - Please bookmark this link to ask new question.

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4520
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3121
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3035
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/lanis/2009-4-1_233717_phput9xef_c1pm.jpg Lani S.'s Avatar

    Lani S.

    Tutor

    Satisfied Customers:

    2457
    Registered Nurse, Internet Researcher, Private Tutor
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2341
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1975
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1873
    Bachelors Degree and CPA with Accounting work experience
 
 
 

Related Homework Questions