Lab 4

Lab 4

University

8 Qs

quiz-placeholder

Similar activities

Kiểm tra kiến thức về HTML + CSS

Kiểm tra kiến thức về HTML + CSS

University

10 Qs

KLS8 IT

KLS8 IT

8th Grade - University

10 Qs

Мәтінді форматтау

Мәтінді форматтау

10th Grade - University

10 Qs

Web Programming Quiz in Portuguese

Web Programming Quiz in Portuguese

University

10 Qs

IMSD_Week-1_CSE-1

IMSD_Week-1_CSE-1

University

10 Qs

SQL TEST

SQL TEST

11th Grade - University

10 Qs

KUIS DENGAN TOPIK MATERI PERTEMUAN 1

KUIS DENGAN TOPIK MATERI PERTEMUAN 1

10th Grade - University

10 Qs

Pemrograman Web 1  - D3 Tekom

Pemrograman Web 1 - D3 Tekom

University

12 Qs

Lab 4

Lab 4

Assessment

Quiz

Information Technology (IT)

University

Practice Problem

Hard

Created by

Lee Fah

Used 5+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 3 pts

What is the correct syntax to define a simple data type in VDM++?

type MyType = seq of char;

type MyType : seq of char;

types MyType = seq of char;

types MyType : seq of char;

2.

MULTIPLE CHOICE QUESTION

10 sec • 3 pts

Which of the following is an example of defining a union type in VDM++?

Faculty = <FSKTM> | <FEB>;

Faculty = <FSKTM, FEB>;

Faculty : <FSKTM> | <FEB>;

Faculty = {FSKTM, FEB};

3.

MULTIPLE CHOICE QUESTION

5 sec • 3 pts

Which of the following is NOT a valid predefined type in VDM++?

nat

char

string

real

4.

MULTIPLE CHOICE QUESTION

20 sec • 3 pts

In VDM++, how do you declare an instance variable of type int within a class?

instance variable studentName : seq of char;

instance variables studentName : seq of char;

instance variable studentName : seq of char = "John Doe";

instance variables studentName = "John Doe";

5.

MULTIPLE CHOICE QUESTION

20 sec • 3 pts

Which of the following is an example of an explicit function in VDM++?

sum(a, b) == post RESULT = a + b;

sum(a, b) == pre a > 0 and b > 0; post RESULT = a + b;

sum(a, b);

sum(a, b) == a + b;

6.

MULTIPLE CHOICE QUESTION

10 sec • 3 pts

Which of the following statements about implicit functions is true?

Provide a full implementation of the computation.

Used when you need to sequence operations.

Use pre & post conditions to define expected behavior

Cannot have any conditions.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the correct syntax to define an implicit function in VDM++?

multiply(x, y) == post RESULT = x * y;

multiply(x, y) ==> x * y;

multiply(x, y) == x * y;

multiply(x, y) == pre x > 0 and y > 0; post RESULT = x * y;

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?