ログイン

COMP PROG MIDTERM
42問 • 1年前
  • iam noone
  • 通報

    問題一覧

  • 1

    are used to execute a block of statements multiple times. It means it executes the same code multiple times so it saves code.

    Looping Control Statements

  • 2

    It executes the code until condition is false

    For loop

  • 3

    It is used when number of iterations are known.

    For loop

  • 4

    for (initialization; condition; increment/decrement) {statements;}

    Syntax

  • 5

    is also known as initialize expression

    initialization

  • 6

    is also known as logical expression

    condition

  • 7

    is also known as update expression

    increment/decrement

  • 8

    is called the body of the for loop

    statemt

  • 9

    are structures that control repeated executions of a block of statements.

    Loops

  • 10

    Java programming language provides a powerful control structure called ____

    loop

  • 11

    may not execute the body of the loop at all if the condition is initially false.

    While loop

  • 12

    performing actions and testing for the stopping condition.

    Both while and do while loops

  • 13

    uses a counter to control the loop.

    counter controlled while loop

  • 14

    Body of the loop - must contain a statement that changes the value of the counter variable.

    true

  • 15

    is a special value that marks the end of the input data.

    Sentinel

  • 16

    ✓ The sentinel must be similar, yet different, from all the data items.

    true

  • 17

    uses to control the while loop. The while loop continues to execute until the sentinel is read.

    sentinel-controlled while loop

  • 18

    simplifies the writing of a counter-controlled while loop. is counter-controlled, meaning that they are normally used whenever the number of iterations is known in advance.

    for loop

  • 19

    is a a loop that doesn't contain any executable statement,

    empty loop

  • 20

    is a loop that runs an infinite number of times.

    infinite loop

  • 21

    are loops that repeat forever without stopping

    Infinite loop

  • 22

    might not execute at all,

    The body of the while and for loops

  • 23

    always executes at least once.

    the body of a do...while loop

  • 24

    are two statements that allow us to further control flow within and out of loops.

    Break and continue

  • 25

    causes execution to immediately jump out of the current loop, and proceed with the code following the loop.

    break statement

  • 26

    causes the remainder of the current iteration of the loop to be skipped, and for execution to recommence with the next iteration.

    continue statement

  • 27

    update statement in the body of the loop might not execute.

    continue statement executes in a while or do ... while loop,

  • 28

    , the update statement is the next statement executed.

    continue statement executes in a for loop

  • 29

    is evaluated before executing the body of the loop.

    In a while or for loop

  • 30

    is evaluated after executing the body of the loop.

    In a do… while loop

  • 31

    In a while/for loop are called

    Pretest loops

  • 32

    In a do/while loop are called

    post test loops

  • 33

    is a loop within a loop, an inner loop within the body of an outer one.

    nested loop

  • 34

    is an abstract data type.

    File

  • 35

    used to store related information is known as a File.

    named location

  • 36

    to create a new file we can use____ it returns true if a new file is created; false if the file already exists in the specified location

    createNewFile()

  • 37

    In order to write data into a file, we will use the

    Scanner class

  • 38

    In order to write data into a file, we will use the We need to close the stream using the close() method to retrieve the allocated resources

    FileWriter class and its write() method together.

  • 39

    executes till the conditions becomes false

    While loop

  • 40

    It will execute the loop body only if the condition is true

    Do-while loop

  • 41

    Called exit controlled

    While for

  • 42

    called entry controlled

    While loop

  • Data Structure (history)

    Data Structure (history)

    iam noone · 64問 · 1年前

    Data Structure (history)

    Data Structure (history)

    64問 • 1年前
    iam noone

    Linear Data Structure

    Linear Data Structure

    iam noone · 43問 · 1年前

    Linear Data Structure

    Linear Data Structure

    43問 • 1年前
    iam noone

    Searching for Algorithms

    Searching for Algorithms

    iam noone · 22問 · 1年前

    Searching for Algorithms

    Searching for Algorithms

    22問 • 1年前
    iam noone

    Linked list/ Trees and graphs

    Linked list/ Trees and graphs

    iam noone · 51問 · 1年前

    Linked list/ Trees and graphs

    Linked list/ Trees and graphs

    51問 • 1年前
    iam noone

    Sorting algorithms

    Sorting algorithms

    iam noone · 41問 · 1年前

    Sorting algorithms

    Sorting algorithms

    41問 • 1年前
    iam noone

    INTRO TO MS ACCESS(database)

    INTRO TO MS ACCESS(database)

    iam noone · 19問 · 1年前

    INTRO TO MS ACCESS(database)

    INTRO TO MS ACCESS(database)

    19問 • 1年前
    iam noone

    Introduction To Java Programming Language

    Introduction To Java Programming Language

    iam noone · 80問 · 1年前

    Introduction To Java Programming Language

    Introduction To Java Programming Language

    80問 • 1年前
    iam noone

    Mod 2: Comp Prog

    Mod 2: Comp Prog

    iam noone · 55問 · 1年前

    Mod 2: Comp Prog

    Mod 2: Comp Prog

    55問 • 1年前
    iam noone

    FUNDAMENTALS OF DATABASE (Lesson 1)

    FUNDAMENTALS OF DATABASE (Lesson 1)

    iam noone · 31問 · 1年前

    FUNDAMENTALS OF DATABASE (Lesson 1)

    FUNDAMENTALS OF DATABASE (Lesson 1)

    31問 • 1年前
    iam noone

    FUNDAMENTALS OF DATABASE (part2)

    FUNDAMENTALS OF DATABASE (part2)

    iam noone · 33問 · 1年前

    FUNDAMENTALS OF DATABASE (part2)

    FUNDAMENTALS OF DATABASE (part2)

    33問 • 1年前
    iam noone

    DATABASE 2-5 MOD

    DATABASE 2-5 MOD

    iam noone · 25問 · 1年前

    DATABASE 2-5 MOD

    DATABASE 2-5 MOD

    25問 • 1年前
    iam noone

    DEPTALS (COMP PROG)

    DEPTALS (COMP PROG)

    iam noone · 49問 · 1年前

    DEPTALS (COMP PROG)

    DEPTALS (COMP PROG)

    49問 • 1年前
    iam noone

    HCI HISTORY

    HCI HISTORY

    iam noone · 18問 · 11ヶ月前

    HCI HISTORY

    HCI HISTORY

    18問 • 11ヶ月前
    iam noone

    Module 1 (System Analysis)

    Module 1 (System Analysis)

    iam noone · 18問 · 12ヶ月前

    Module 1 (System Analysis)

    Module 1 (System Analysis)

    18問 • 12ヶ月前
    iam noone

    Module 1 (Data Analytics)

    Module 1 (Data Analytics)

    iam noone · 35問 · 12ヶ月前

    Module 1 (Data Analytics)

    Module 1 (Data Analytics)

    35問 • 12ヶ月前
    iam noone

    Module 2(Data Analytics)

    Module 2(Data Analytics)

    iam noone · 35問 · 11ヶ月前

    Module 2(Data Analytics)

    Module 2(Data Analytics)

    35問 • 11ヶ月前
    iam noone

    Module 1 (Networking)

    Module 1 (Networking)

    iam noone · 25問 · 12ヶ月前

    Module 1 (Networking)

    Module 1 (Networking)

    25問 • 12ヶ月前
    iam noone

    Module 1 (Info Assurance)

    Module 1 (Info Assurance)

    iam noone · 22問 · 12ヶ月前

    Module 1 (Info Assurance)

    Module 1 (Info Assurance)

    22問 • 12ヶ月前
    iam noone

    mod 1 IT LIVING

    mod 1 IT LIVING

    iam noone · 61問 · 11ヶ月前

    mod 1 IT LIVING

    mod 1 IT LIVING

    61問 • 11ヶ月前
    iam noone

    問題一覧

  • 1

    are used to execute a block of statements multiple times. It means it executes the same code multiple times so it saves code.

    Looping Control Statements

  • 2

    It executes the code until condition is false

    For loop

  • 3

    It is used when number of iterations are known.

    For loop

  • 4

    for (initialization; condition; increment/decrement) {statements;}

    Syntax

  • 5

    is also known as initialize expression

    initialization

  • 6

    is also known as logical expression

    condition

  • 7

    is also known as update expression

    increment/decrement

  • 8

    is called the body of the for loop

    statemt

  • 9

    are structures that control repeated executions of a block of statements.

    Loops

  • 10

    Java programming language provides a powerful control structure called ____

    loop

  • 11

    may not execute the body of the loop at all if the condition is initially false.

    While loop

  • 12

    performing actions and testing for the stopping condition.

    Both while and do while loops

  • 13

    uses a counter to control the loop.

    counter controlled while loop

  • 14

    Body of the loop - must contain a statement that changes the value of the counter variable.

    true

  • 15

    is a special value that marks the end of the input data.

    Sentinel

  • 16

    ✓ The sentinel must be similar, yet different, from all the data items.

    true

  • 17

    uses to control the while loop. The while loop continues to execute until the sentinel is read.

    sentinel-controlled while loop

  • 18

    simplifies the writing of a counter-controlled while loop. is counter-controlled, meaning that they are normally used whenever the number of iterations is known in advance.

    for loop

  • 19

    is a a loop that doesn't contain any executable statement,

    empty loop

  • 20

    is a loop that runs an infinite number of times.

    infinite loop

  • 21

    are loops that repeat forever without stopping

    Infinite loop

  • 22

    might not execute at all,

    The body of the while and for loops

  • 23

    always executes at least once.

    the body of a do...while loop

  • 24

    are two statements that allow us to further control flow within and out of loops.

    Break and continue

  • 25

    causes execution to immediately jump out of the current loop, and proceed with the code following the loop.

    break statement

  • 26

    causes the remainder of the current iteration of the loop to be skipped, and for execution to recommence with the next iteration.

    continue statement

  • 27

    update statement in the body of the loop might not execute.

    continue statement executes in a while or do ... while loop,

  • 28

    , the update statement is the next statement executed.

    continue statement executes in a for loop

  • 29

    is evaluated before executing the body of the loop.

    In a while or for loop

  • 30

    is evaluated after executing the body of the loop.

    In a do… while loop

  • 31

    In a while/for loop are called

    Pretest loops

  • 32

    In a do/while loop are called

    post test loops

  • 33

    is a loop within a loop, an inner loop within the body of an outer one.

    nested loop

  • 34

    is an abstract data type.

    File

  • 35

    used to store related information is known as a File.

    named location

  • 36

    to create a new file we can use____ it returns true if a new file is created; false if the file already exists in the specified location

    createNewFile()

  • 37

    In order to write data into a file, we will use the

    Scanner class

  • 38

    In order to write data into a file, we will use the We need to close the stream using the close() method to retrieve the allocated resources

    FileWriter class and its write() method together.

  • 39

    executes till the conditions becomes false

    While loop

  • 40

    It will execute the loop body only if the condition is true

    Do-while loop

  • 41

    Called exit controlled

    While for

  • 42

    called entry controlled

    While loop