1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dedylja [7]
3 years ago
7

2- In Ada, the choice lists of the case statement must be exhaustive, so that there can be no unrepresented values in the contro

l expression. In C++, unrepresented values can be caught at run time with the default selector. If there is no default, an unrepresented value causes the whole statement to be skipped. What are the pros and cons of these two designs (Ada and C++)? ( at least 5 lines)
Computers and Technology
1 answer:
Solnce55 [7]3 years ago
6 0

Pros of Ada's design: Reliability.The programmer must manage all possible values. This prevents the programmer from accidentally forgetting to process certain values. It also increases readability,especially as it pertains to Reliability. When a programmer is reading code that has a case construct, it is easy to miss the fact that unrepresented values are not dealt with.

Cons of Ada's design: Writability. The programmer may choose to have the program do nothing for

unrepresented values. However, this is a very minor con since the default case can do nothing anyway.

At least, requiring the programmer to include an empty default case, they must be explicit about the fact that they wish to do nothing for unrepresented values.

You might be interested in
Assume the integer variable num has been assigned a valid value. What is the purpose of the following code segment?
Pie

Answer:

2

Explanation:

The num%4 operation returns the remainder, so only if num is not a multiple of 4, this value will be non-zero (it will be 1, 2 or 3).

7 0
3 years ago
The sticky notes often have strings of characters written on them that appear to be passwords. What can you do to prevent the se
Varvara68 [4.7K]
Educate the user on how to make strong passwords
8 0
2 years ago
The Campus Housing Service helps students find apartments. Owners of apartments fill in information forms about the rental units
Alexxx [7]

Answer:

Check the explanation

Explanation:

LI system and software engineering concepts, the use cases are widely used Use case is a collection of eve. or actions steps, it mainly defining the interactions between a system and a role for achieving a specific goal.

Here the actor can he external system or a human being:

For identifying the use case, the below steps needs to he followed

• Identify the actors involved in the system.

  • In our task the actors are the student and the owners  

• Identify the actor's goals

  • Goals are the activities performed

• Identify the use case candidates

The persons who are all actively involved in the use case

• Identify the use case starting points

• Identifying the use case ending points

• rind the scope and the unit of interactions in the use case  

Identifying the steps in Housing system:

• Several implementation steps are provided in the task that needs to he identified in this particular stage

• The housing system is helping the stuck,. for finding the con. apartments which is meeting their requirements

Check the below diagram.

6 0
4 years ago
When defining an array of class objects, how do you pass arguments to the constructor for each object in the array?
Nuetrik [128]
Basically, the array[ index ] is the name of the object so when you  populate the array you'd have statement[s] like:

array[ index ] = new ClassName( arg0, arg1, arg2 );
8 0
3 years ago
A new object of type list is created for each recursive invocation of f.A. TrueB. False
sammy [17]

Answer:

True but double check!

7 0
3 years ago
Other questions:
  • You are designing a web application that stores static assets in an amazon simple storage service (s3) bucket. you expect this b
    12·1 answer
  • In order for an IT security framework to meet information assurance needs, the framework needs to include policies for several a
    13·1 answer
  • .exe, .msi, .msp, .inf - together, what do these filetypes indicate
    12·2 answers
  • The different types of DDR modules are easily identifiable because of what factor?
    8·2 answers
  • The two major factors that impact processor speed or clock speed and _____ .
    8·1 answer
  • Intranets are typically set up behind a firewall. <br> a. True <br> b. False
    15·1 answer
  • Write a program to enter a number and test if it is greater than 45.6.if the number entered is greater than 45.6 the program nee
    13·1 answer
  • How to convert mkv to avi without losing quality?
    14·1 answer
  • c) If you are at foreign country visit, which banking card would you prefer to keep with you during visit (Debit Card or Credit
    10·1 answer
  • As you will solve more complex problems, you will find that searching for values in arrays becomes a crucial operation. In this
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!