Java Programming homework /essay questions
1. (TCO 6) To retrieve the number of items in a Choice menu, use the _____ method. (Points : 4)
2. (TCO 6) Which of the following is not a GUI component (control or widget)? (Points : 4)
3. (TCO 6) _____ components do not create native controls, as do the _____ controls. (Points : 4)
4. (TCO 6) A(n) _____ is the term used to specify a class that instantiates other classes and calls appropriate methods. (Points : 4)
5. (TCO 2) One of the features of the _____ layout manager includes the specification of number of rows and columns (Points : 4)
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;
int myTable = new int;
int myTable = new int;
int myTable = new int;
7. (TCO 2) The mechanism(s) for handling an event, involve _____. (Points : 4)
All of the above
8. (TCO 2) The first parameter in the for statement is a(n) _____. (Points : 4)
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)
11. (TCO 5) _____ is a common language composed of statements to manipulate a database. (Points : 4)
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)
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)
14. (TCO 5) _____ is an association between fields. (Points : 4)
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)
16. (TCO 6) A constructor for a Dimension object takes _____ argument(s). (Points : 4)
one integer array
17. (TCO 6) The setBold() and setFontSize() methods belong to the _____ class. (Points : 4)
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)
19. (TCO 6) The _____ method creates a tool tip. (Points : 4)
20. (TCO 7) 01000001 is an example of a(n) _____. (Points : 4)
21. (TCO 7) The _____ package contains a collection of file and stream classes that support reading and writing data. (Points : 4)
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)
24. (TCO 6) The _____ method is not a member of the String class. (Points : 4)
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)
27. (TCO 6) Which of the following Collection interfaces can contain duplicates? (Points : 4)
28. (TCO 6) _____ is an implementation of a Collections Framework interface, which is a list implemented as an array. (Points : 4)
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)
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.
For ATLProg only
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.
0 3 9 0
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?
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.
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.
Okay, I'll add the difference as bonus/tip.
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.
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.
Try this link ... Download Answer Link or just copy paste this link in your browser window...
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)
I seem to be having issues with that updated link too. It displayed a message that stated "No data received".
I tried copying and pasting that link in google chrome and IE and it is not working.
I rated you and hope you received everything and thanks again for your assistance!