• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Mock Exam Batch 1!!

 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK folks, don't flame me if I made some errors here
These are first drafts... and this is the first of two sets I will make. I will do more GUI stuff a little later in the week, but this is a start, and covers mainly the first half of the objectives... I hope you will discuss them and I will post the answers later, and/or at least *confirm* that you all have arrived at the correct answer. If you find an error in the question itself, let me know immediately and I'll change it.
Have fun
Oh yeah, I have done a few things a little differently than the real exam:
1) The real exam tells you how many answers to select. I'm not doing that, which means THESE questions are a little more difficult than in the real exam.
2) To keep it smaller, I've made some of my questions have *more* possible answers than in the real exam. So, in the exam you might have several smaller questions on one topic, but I've put them into one big question with a LOT of possible answers.
3) The real exam uses drag and drops, which I can't represent here... but in a couple of questions I ask you to put a letter or mark next to a word or class name to get you to do the same kind of thing you might have to do in a drag and drop.
4) I did not include much code here, but there IS a lot of code in the real exam. I can't get my VirtualPC working tonight, so I couldn't compile anything and I don't want to mislead you. I'll get things working again before I post the second batch, so the next set will have code.
But the questions here are still VERY representative of the types of questions on the real exam.
==================================
1) Which are true about JTWI 1.0?
A) CLDC 1.1 is the minimum CLDC requirement.
B) CLDC 1.0 is the minimum CLDC requirement.
C) A JTWI-compliant device must support a MIDlet suite JAR size up to 64 KB.
D) A JTWI-compliant device must support a MIDlet suite JAR size up to 128 KB.
E) MIDP 2.0 is required.
F) WMA 1.1 is an optional specification.
==============================

2) Which is true about MMAPI and JTWI?
A) All of MMAPI must be implemented in a JTWI-compliant device.
B) A JTWI device must implement all of the MMAPI, PLUS additional media APIs.
C) A JTWI device must implement a subset, but not all, of the MMAPI.
D) A JTWI device must implement ONLY a subset, and never all, of the MMAPI.
E) A JTWI device must support media types explicitly defined in JTWI, regardless of whether they are specified in MMAPI.
==============================

3) A FAKE drag and drop
Given the list of classes below, put a "B" next to those which exist in both J2SE and CLDC 1.1, put a "C" for those which exist ONLY in CLDC 1.1 (but not in J2SE) and put a "J" next to those which exist ONLY in J2SE (but not in CLDC 1.1).

ArrayList
ThreadGroup
Float
Socket
BufferedOutputStream
Stack
StreamConnection
FileOutputStream
VirtualMachineError
NoClassDefFoundError
IllegalAccessError
==============================

4) Given the MIDlet code:
public void notifyDestroyed() {
System.out.println("foo");
System.exit(0);
System.out.println("bar");
}
What is the result?
(assume that the device has a console for System.out)
A) Compilation fails.
B) "foo" (but not "bar") is sent to the console.
C) Code throws a runtime exception.
D) Both "foo" and "bar" are sent to the console.
E) Compilation succeeds, and the code does not throw an exception, but nothing is output from that method.
==============================

5) Which are true about MIDlets?
A) Classes in one suite have restricted access to classes in a other suites.
B) Classes in one suite have full access to classes in another suite, as long as both suites are trusted.
C) Classes in one suite can never access classes in other suites.
==============================

6) Which are true?
A) A MIDlet can never be installed in an untrusted domain.
B) A MIDlet suite can be installed in an untrusted domain ONLY if the suite is signed with an x.509 PKI certificate.
C) A MIDlet can be installed in an untrusted domain if the suite is authenticated with an invalid cx.509 PKI certificate.
D) a MIDlet can be installed in an untrusted domain if it is not signed with a x.509 PKI certificate.
E) An untrusted suite can request permissions in the JAR manifest.
F) An untrusted suite can never access protected functions.
G) All MIDP 1.0 suites are considered trusted.
H) All CLDC suites are considered trusted.

==============================
7) Which are true?
A) A suite using x.509 PKI authentication must have a midlet-permission JAD attribute.
B) Suites using x.509 PKI authentication must have a security certificate inside the META-INF directory.
C) A suite using x.509 PKI authentication must use base64 encoding for the certificate.
==============================
8) Which connection String goes with the SocketConnection interface?
A) socket://:4242
B) http://foo.sun.com
C) socket:162.101.4.100:4242
D) datagram://:4242
==============================
9) Which are true?
A) A MIDP 2.0 device is guaranteed to be able to create an HTTP connection to a server that supports HTTP 1.1.
B) A MIDP 2.0 device can NOT create HTTP connections.
C) A MIDP 2.0 device is not required to support HTTP 1.1, but it may.
==============================
10) What is the function of the Application Descriptor?
[on real exam, you would not answer this as an essay, but I didn't have time to come up with good answers for it ]
==============================
11. Which are true?
A) A MIDlet cannot access its manifest.
B) A MIDlet can access its manifest as a system property.
C) A MIDlet can access its manifest using a method from Class.
D) Only a trusted MIDlet can access its manifest.
E) MIDlets are not allowed to have manifests.
==============================
12. [not a question... be preared to read and write a JAD file]
==============================
13. Which are true?
A) A MIDlet suite can have more than one MIDlet.
B) A single JAD file can specify more than one MIDlet.
C) A JAD file specifies the Jar-Size
D) A JAD file does not specify the URL of the jar.
==============================
14) Which is true about push notification?
A) A MIDlet's push() method will be called initially.
B) A MIDlet's startApp() will be called initially.
C) A MIDlet's pushNotification() will be called initially
D) A MIDlet's pushListener() will be called initially.
E) A MIDlet's init() method will be called initially.
F) A MIDlet's notifyConnection() will be called initially.
==============================
15) Given a push connection String:

socket://:42, foo.Bar, 168.2 ? ?.*.?
which of these addresses could push notifications to a MIDlet?
A) 168.20.2.1
B) 168.2.2.100
C) 168.200.27.1
D) 168.200.27.1
E) 168.200.1.1
F) 168.200.100.1

==============================
16) Put an "H" next to the code or class from the high-level MIDP 2.0 API, and and an "L" next to those from the low-level API. Put a "E" for those things that could apply to either high-level or low-level, depending on how they're used.
When we use "...", assume that whatever you don't see is correct.
new Command(...);
Form f = new Form();
graphicsObject.setColor(...);
new Canvas(...);
paint(Graphics g) { }
Sprite
LayerManager
==============================

OK, now it's your turn folks, so GET BUSY working on these ; )
cheers,
Kathy
"Just a J2ME girl living in a J2EE world"
 
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Very thank...
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kathy!
I (and some other guys too) am afraid tha i can't put my hands in a voucher for this exam. I really like to do this test! What can I do? I sent my request on jan 28 but until now i got no response, not even the automatic response from prometric... What can I do?
Please see this topic too: https://coderanch.com/t/157039/po/certification/Evelyn-Must-send-new-request
Thank you very much!
[ February 04, 2004: Message edited by: Eduardo Rodrigues ]
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting these questions.
In question 3, did you want the "IllegalAccessError" to read "IllegalAccessException" or should we expect classes that don't exist in a question like this?
In question 15, choices C and D are identical.
Anyway, here is my shot at them:
1) B,C,E
2) C
3) J/J/B/J/J/B/C/J/C/C/C(if IllegalAccessException)
4) A (because notifyDestroyed() if final)
5) C
6) D,E
7) C
8) A
9) A
10) To provide a smaller file with key information about the Midlet for download decisions
11) C (assuming the "method" is getAppProperty() from Midlet "CLASS")
12) Use Midlet.getAppProperty() to read fields from JAD / manifest
13) A,B,C
14) B
15) C,D,E,F
16) E/H/L/L/L/L/L
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kathy,
I was wondering . The third question (VirtualMachineError and NoClassDefFoundError) exists in Both, CLDC 1.1 and J2SE.
Am I wrong?
Rodolfo Machado
[ February 05, 2004: Message edited by: Rodolfo Machado ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the mock questions Kathy. You have always gone above and beyond for all of us and we all appreciate it very much,
Mark
 
Ramjet
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I believe answer #3 is incorrect.
Perhaps it should be:
3) J/J/B/J/J/B/C/J/C/B/B(if IllegalAccessException)
Thanks for catching my error.
 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
really thank u a lot~~~
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much ,
a good start for a brand new certification(SCMAD)
Thanks,
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ramjet,
I think the correct answer to 3 is:
J/J/B/J/J/B/C/J/B/B/J
VirtualMachineError exists in J2SE as well.
IllegalAccessError only exists in J2SE, IllegalAccessException exists in both.
 
the sopskrutt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, a note on question 6:
The suite can request permissions in the JAR manifest, however according to the specification, the MIDlet-Permissions and MIDlet-Permissions-Opt tags are ignored for unsigned (untrusted) MIDlets. Only signed MIDlets are required to use these tags. This is probably due to backwards compability to MIDP-1.0 MIDlets HTTP API access.
 
the sopskrutt
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Heh, a few more things:
Question 2:
I would say that JTWI superseed all other specifications, so I'm tempted to add E to the answer list here. However that would be a little theoretical, since it would assume a future version of JTWI.
Question 11:
I would say that there is no valid answer.
A is wrong, since a MIDlet can access attributes in its manifest using MIDlet.getAppProperty
B is also wrong since the application properties (manifest and JAD values) are not system properties
C is wrong, Class doesn't have this feature, MIDlet does.
D and E are totally wrong, no comments needed.
Question 16:

paint(Graphics g) { }


is almost used in the CustomItem (has additional parameters int and int), so one could consider setting both high- and low level on that one.
 
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by the sopskrutt:
[QB]Heh, a few more things:
Question 11:
I would say that there is no valid answer.
A is wrong, since a MIDlet can access attributes in its manifest using MIDlet.getAppProperty
B is also wrong since the application properties (manifest and JAD values) are not system properties
C is wrong, Class doesn't have this feature, MIDlet does.
D and E are totally wrong, no comments needed.


I think the answer should be C. Since we got java.lang.Class.getResourceAsStream() to access the manifest file, right?
Anyway, could kathy provide us your answers? :roll:
[ February 17, 2004: Message edited by: Ken Ho ]
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

3) A FAKE drag and drop
Given the list of classes below, put a "B" next to those which exist in both J2SE and CLDC 1.1, put a "C" for those which exist ONLY in CLDC 1.1 (but not in J2SE) and put a "J" next to those which exist ONLY in J2SE (but not in CLDC 1.1).
ArrayList ...

Any class used in CLDC 1.1 will be supported by J2SE. I think if you choice includes "C", you are wrong. right?
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Forrest Xu:

Any class used in CLDC 1.1 will be supported by J2SE. I think if you choice includes "C", you are wrong. right?


so many class not included in J2SE,like GCF
[ February 22, 2004: Message edited by: Weishe Zhao ]
 
Forrest Xu
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<B>quote:
--------------------------------------------------------------------------------
Originally posted by Forrest Xu:
Any class used in CLDC 1.1 will be supported by J2SE. I think if you choice includes "C", you are wrong. right?
--------------------------------------------------------------------------------
so many class not included in J2SE,like GCF<B>
J2SE includes CLDC! See page 23 JSR 139. So
Any class used in CLDC 1.1 will be supported by J2SE. I think if you choice includes "C", you are wrong. right?
most of GCF is MIDP. MIDP is not included by J2SE.
Am I right?
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out the CLDC spec
6.2 covers the classes from J2SE
6.3 outlines the classes that are CLDC-Specific, known as the GCF
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
question 2: C,E. MIDI is required. See page 34 of the JTWI spec.

question 4: I ran the code.
it doesn't compile because notifyDistroyed expects a boolean argument.
if you correct that and compile running it gives:

"foo
destroyApp threw an Exception
java.lang.SecurityException: MIDP lifecycle does not support system exit."

bar isn't sent to the console.
[ November 24, 2005: Message edited by: Nobuhiro Watsuki ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic