C++ and J2EE Programming Concepts

Quiz covering advanced C++ OOP concepts (constructors, templates, overloading, access levels) and J2EE enterprise development (multitiered applications, beans, containers, XML)

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is a J2EE component?

  1. Special icons for creating the user interface elements for thin clients
  2. A data module saved to the component area of the database.
  3. A self-contained functional software unit that is assembled into a J2ee application and interfaces with other application components
  4. A JAR file
Question 2 Multiple Choice (Single Answer)

What advantage does a entity-bean have over a session bean?

  1. Entity-bean data survives crashes.
  2. An entity-bean represents non-persistent data.
  3. It creates its own JAR file during deployment
  4. You get authentication code without having to write any.
Question 3 Multiple Choice (Single Answer)

When do you use a session bean?

  1. When you want to be certain your application data persists between program invocations , even in the event of a crash
  2. If you need to initiate a database transaction
  3. To process transient data that can be re-created in the event of a crash.
  4. to keep people who do not know how to program , from accidentally changing important logic code.
Question 4 Multiple Choice (Single Answer)

Why would you design a J2EE application so user data is entered by way of a JavaServer Page and managed by an underlying JavaBeans class?

  1. To make the user interface more interesting.
  2. To simplify application deployment.
  3. To prevent malicious programs from gaining access to sensitive information on your database server.
  4. To make the application much easier to update, maintain, and manage
Question 5 Multiple Choice (Single Answer)

Why is XML a good way to transfer text-based data from one program or tool to another?

  1. XML imposes important limitations on the receiving program or tool.
  2. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data
  3. XML tags offer an extra level of security.
  4. XML tags specify to the receiving program or tool exactly how to format and display the data.
Question 6 Multiple Choice (Single Answer)

What part of the J2EE platform handles data storage and retrieval on behalf of a container-managed entity bean?

  1. The thin client.
  2. Deployment descriptors
  3. The JAR file.
  4. The bean's container
Question 7 Multiple Choice (Single Answer)

What is bean-managed persistence?

  1. When you implement entity or session bean methods to use SQL commands you provide
  2. When the bean's container handles data storage and retrieval.
  3. When the J2EE server is never shut down.
  4. When changes to database data are lost during a crash
Question 8 Multiple Choice (Single Answer)

How are life cycle methods called?

  1. By thin clients.
  2. By calls to the database
  3. By the J2EE server.
  4. By the bean's container.
Question 9 Multiple Choice (Single Answer)

In a multitiered application, which tier is the browser in?

  1. First tier.
  2. Second tier.
  3. Third tier.
  4. Fourth tier.
Question 10 Multiple Choice (Single Answer)

Inline functions are invoked at the time of

  1. Run time
  2. Compile time
  3. Depends on how it is invoked
  4. Both b and c
Question 11 Multiple Choice (Single Answer)

Which of the following operators below allow to define the member functions of a class outside the class?

  1. ::
  2. ?
  3. :?
  4. %
Question 12 True/False

Every class has at least one constructor function, even when none is declared.

  1. True
  2. False
Question 13 True/False

Can constructors be overloaded?

  1. True
  2. False
Question 14 True/False

An abstract class can be instantiated.

  1. True
  2. False
Question 15 Multiple Choice (Single Answer)

The default access level assigned to members of a class is ___________

  1. Public
  2. Protected
  3. Private
  4. Default
Question 16 Multiple Choice (Single Answer)

What is the difference between overloaded functions and overridden functions?

  1. Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding
  2. Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called a overloaded fucntion.
  3. Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding
  4. Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden fucnion.
Question 17 Multiple Choice (Single Answer)

Which of the following library function below by default aborts the program?

  1. Terminate()
  2. end()
  3. abort()
  4. exit()
Question 18 Multiple Choice (Single Answer)

What defines a general set of operations that will be applied to various types of data?

  1. Template class
  2. Function template
  3. Class template
  4. Both a and c
Question 19 Multiple Choice (Single Answer)

What happens when a pointer is deleted twice?

  1. It can abort the program
  2. It can cause a failure
  3. It can cause an error
  4. It can cause a trap
Question 20 True/False

There is nothing like a virtual constructor of a class.

  1. True
  2. False