Prism Test (Answer Sheet)

Practice tests to further your career.

Intro

These questions were prepared by Mike Prestwood and are intended to stress an important aspect. All our practice questions are intended to prepare you specifically to earn your Prestwood certification and generally for passing any certification test as well as prepare you for professional work.

17 Questions


Beginner

10 Beginner Level Questions

Question #1: Multiple Choice

Which code fragment uses the correct syntax to declare a constant?

Answer:
1. 

const

  kPI Double = 3.1459;

2. 

const

  kPI : Double := 3.1459;

3. 

const

  kPI As Double = 3.1459;

4. 

const

  kPI : Double = 3.1459;

5. 

const

  kPI As Double := 3.1459;

Question #2: Multiple Choice

Which of the following lines of code will compile?

Answer:
1. 
MessageBox.Show("a");MessageBox.Show('b');
2. 
MessageBox
  .Show("c");
3. 
MessageBox
    .show
     (
    "d"
    );
4. 

All of the above.

5. 

None of the above.

Question #3: True or False?

In Prism you can declare and make use of same named-different case variables (two distinct variables) as in the following:

MyName : String;
MYNAME : String;
Answer:
  • True
  • False
  • Question #4: True or False?

    In Prism, you can nest multiple line comments as in the following:

    {
    (*
    comment here
    *)
    }
      
    MessageBox.Show("Or, like this...");
    (*

    {

    comment here

    }

    *)

    Answer:
  • True
  • False
  • Question #5: True or False?

    In Prism, you can use either apostrphes or quotes for string literals and you can embed an apostrophe and quote in either as follows:

    MessageBox.Show('He said, "Who''s computer?"');
    MessageBox.Show("She said, ""Mike's"".");
    Answer:
  • True
  • False
  • Question #6: Multiple Choice

    The correct syntax for a declaritive variable assignment is?

    Answer:
    1. 
    Married : String = 'N';
    2. 
    Married : String := "N";
    3. 
    Dim Married As String = "N"
    4. 
    Married String := "N";
    5. 
    String Married = "N";
    Question #7: True or False?

    The default for parameters for methods is by reference.

    Answer:
  • True
  • False
  • Question #8: True or False?

     Given the following code, which MessageBox.Show will display? The True or the False one?

    var a, b, c, d: Boolean;
      
    a := False;
    b := False;
    c := True;
    d := False;

    if Not (a and b) and (c or d) then
    MessageBox.Show('True')
    else
    MessageBox.Show('False');

     

    Answer:
  • True
  • False
  • Question #9: True or False?

    In Prism, the base class is TObject.

    Answer:
  • True
  • False
  • Question #10: True or False?

    Each class can have one and only one finalizer.

    Answer:
  • True
  • False

  • Intermediate

    5 Intermediate Level Questions

    Question #11: True or False?

    The traditional name for a finalizer is Finalize but you can call it anything you want.

    Answer:
  • True
  • False
  • Question #12: True or False?

    The method name for a class constructor can be anything including Create and CreateFromTable.

    Answer:
  • True
  • False
  • Question #13: True or False?

    A single class can inherit from a parent class and implement one "or more" interfaces.

    Answer:
  • True
  • False
  • Question #14: True or False?

    With regard to member modifiers, member fields support only readonly and implements. They do not support other member modifiers such as virtual, abstract, empty, etc.

    Answer:
  • True
  • False
  • Question #15: Multiple Choice

    The class visibility specifiers are:

    Answer:
    1. 

    private, strict private, protected, stict protected, public, and published.

    2. 

    private, protected, public, and published.

    3. 

    private, protected, internal, protected internal, and public.

    4. 

    private, protected, assembly and protected, assembly or protected, and public.

    5. 

    Private, Protected, Friend, Protected Friend, and Public.


    Advanced

    2 Advanced Level Questions

    Question #16: Multiple Choice

    You prevent class and method inheritance with what keyword(s)?

    Answer:
    1. 
    Robot = public final class(System.Object)
    public
     method x(); virtual; sealed;
    end;
    2. 
    Robot = public sealed class(System.Object)
    public
     method x(); virtual; sealed;
    end;
    3. 
    Robot = public sealed class(System.Object)
    public
     method x(); virtual; final;
    end;
    4. 
    Robot = public final class(System.Object)
    public
     method x(); virtual; final;
    end;
    5. 
    Robot = public NotOverridable class(Object)
    public
     method x(); virtual; NotInheritable;
    end;
    Question #17: True or False?

    In Prism, inlining is automatically done for you by the JIT compiler for all languages and in general leads to faster code for all programmers whether they are aware of inlining or not.

    Answer:
  • True
  • False
  • www.prestwood.com For service: 916-726-5675
    or support@prestwood.com
    Copyright (C) Prestwood IT Solutions.
    All Rights Reserved.
    Printed 4/18/2025