Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN C++ QUESTION ONE (1) A program has been developed to define the largest number from a set of 10 numbers. The function larger is

IN C++

QUESTION ONE (1)

A program has been developed to define the largest number from a set of 10 numbers. The function larger is used to determine the largest number. The program will read the first number of the dataset has been assigned by the user. It will assume that the first number entered is the largest number and will store it in a variable called max. The program then will read the second number and store it in num. The system will compare max and num and store the larger number into max. Now max contains the larger of the first two numbers. The program will read the third number, compare it with max and store the larger number into max. At this point, max contains the largest of the first three numbers. The program then will read the next number, compare it with max, and store the larger into max. The program will repeat this process for each remaining number in the dataset. Eventually, max will contain the largest number in the data set.

Input data is:

15 20 7 8 28 21 43 12 35 3

The following questions based on the scenario above:

  1. Identify the best method to be used. (2 marks)
  2. Define an appropriate assigned data type for function larger (2 marks)
  3. Write declared identifiers to be used with appropriate comment for each (6 marks)
  4. Define the analysis requirements. (5 marks)
  5. Write an algorithm to solve the problem (10 marks)
  6. Write a pseudocode (15 marks
  7. Draw a flowchart to solve the problem (20 marks)
  8. Write a program in C++ to solve the problem above. (30 marks)
  9. Write a sample output based on answer in question 1(h) (6 marks)
  10. Explain any FOUR (4) techniques to verify the program correctness in programming

(4 marks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Flash XML Applications Use AS2 And AS3 To Create Photo Galleries Menus And Databases

Authors: Joachim Schnier

1st Edition

0240809173, 978-0240809175

More Books

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago