Question
Differentiate between the following terms/concepts: 1.1 Structured programming and Object-oriented programming (4) 1.2 Class and Methods (4) 1.3 Counter-controlled loop and Sentinel controlled loop (4)
Differentiate between the following terms/concepts:
1.1 Structured programming and Object-oriented programming (4)
1.2 Class and Methods (4)
1.3 Counter-controlled loop and Sentinel controlled loop (4)
1.4 Primitive type variable and a Reference variable (4)
1.5 Boolean expression and an Identifier (4)
QUESTION 2 (20)
2.1 Explain the terms unambiguous, deterministic, complete and finite as applied to algorithms. (12)
2.2 Define the term control structure. (2)
2.3 List and explain the three controls structures used in programming. (6)
QUESTION 3 (20)
3.1 Write pseudocode that inputs 2 values from the user and prints out the larger. (5)
3.2 Write a complete Java program called FindLarge for the pseudocode in 3.1. (15)
Question 4
Write a program using called Stars1 that calls a method called Stars() which uses a nested loop to produce the following output:
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started