Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ computer program please answer all practice correct from Q1 until Q3 I want the answer sure 100 % correct. and please sir When you

C++ computer program

please answer all practice correct from Q1 until Q3

I want the answer sure 100 % correct.

and please sir When you answer , put answer with its number . such as answer

Q1 ( i )Screenshot the corrected output from your screen) .so put the answer 1 /i

please do not write answer Q 1 without specifying the question points . so the answer wil be Q1 (i) like this .

Q2 for it consists two part . and require (i) has two part which (A) (B)

(i) Provide C++ statement for:

(a) function CALL to originalOrder

(b) function PROTOTYPE of originalOrder

(ii) Provide C++ fragment codes for function definition of originalOrder

Q3 for question Q3 it is consists three point , which i) (ii) (iii) for iii has A,B please answer like this (3 , iii a ) ( Q3ii) please i want the answer like this

(i)Does the program get the result as same as in instruction 1? If not, how it differs? (page 7)

(ii) Provide C++ statement based on program description in 6.3 (a) and 6.3 (b) of Program 6.3

iii) Provide algorithm in flowchart and C++ statements for Question 6.3 (c).

(a) Algorithm in flowchart)

(b) C++ fragment code

PROBLEM SOLVING for this question Three requirement whic are ;

( (i)Design the structure diagram and algorithm for the whole program)

(ii)

(i)(Design the structure diagram and algorithm for the whole program)

( ii)(Write down your complete source code. Include documentation for the program at appropriate lines of code.

(iii) Compile the program and enter random inputs. Number of outputs must be based on the options provided in the program.

so i need two design for both ( structure diagram ) and ( algorithm)

I will upload answer sheet .. please follow it to answer each point with its question

so pleaser answer as possible as points in the table please ....

i do not answers Random.

this is Q uestion

image text in transcribedimage text in transcribedimage text in transcribed.

so pleaser answer as possible as points in the table please ....

i do not answers Random.

this is Q uestions

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedthis is the first page , practic , I forget to put in the firat ....

i want to remind you ,,, do not forget to answer like this (Schedule )

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

AND i want to contact with you if i hava a quiesion please answer me in the chat down .......

thanks

ANSWER FOR LAB 06 /50 Practice 01: One Dimensional Array /5 2. Screenshot the corrected output from your screen Mark: Answer: /5 Practice 02:15 Arrar of characters /10 0 0 Provide C++ statement for: (a) function CALL to originalOrder Mark: /3 (b) function PROTOTYPE of originalorder /3 Peny Provide C++ fragment codes for function definition of originalorder Mark: Answer: /4 Practice 03: Two dimensional array /15 2. Mark: Does the program get the result as same as in instruction 1? If not, how it differs? (page 7) Answer: /3 Mark: () Provide C++ statement based on program description in 6.3 (a) and 6.3 (b) of Program 6.3. Answer: 14 () Provide algorithm in flowchart and C++ statements for Question 6.3 (c). Mark: /4 (a) Algorithm in flowchart Answer: /4 (b) C++ fragment code Answer: PROBLEM SOLVING: /20 YOUR SUGGESTION: M 1. Design the structure diagram and algorithm for the whole program Answer: 1. Copy, compile and run the program of Code_Examplel.cpp. Type 1 to 10 when ask for input. The program will produce the following output as shown in Figure 6.1. Note that the program is unable to display the correct value. Type 10integer numbers. Data #1:1 Data #2:2 Data #3:3 Data #4:4 Data #5:5 Data #6:6 Data #7:7 Data #8:8 Data #9:9 Data #10:10 Display in reverse order Data #10: 10 Data #9: 10 Data #8: 10 Data #7: 10 Data #6: 10 Data #5: 10 Data #4: 10 Data #3: 10 Data #2: 10 Data #1: 10 Data #0: 10 Press any key to continue... Figure 6.1: Output Program 6.1 2. Now, without changing the original code, fix the program using array. Fix the C++ code at the highlighted lines as shown in Program 6.1. Then compile and run. Input the data as in Figure 6.1. Make sure you display the correct value. //Program 6.1: Working with arrays The main function calls a user-defined function named readData without transfers anything. The myProgram reads the input from the user up to 10 integer numbers. Then, it displays it in reverse order. #include #include using namespace std; const int N = 10; void myProgram(void); //prototype of my Program int main(void) { myProgram(); //calls myProgram and transfers nothing system ("pause"); return ; 2 Practice 02: Working with array of character (10 marks) 1. Study the program 6.2 (in appendix) to understand the task performed and how arrays of characters are created. Then, copy, compile and run the program of Program 6.2. Type computer. when ask for input. The program will produce the following output (Figure 6.3). Enter up to 10 characters. (Enter. to stop the input): computer. ------- Display in reverse order ------- retupmoc Press any key to continue... Figure 6.3: Output program 6.2 2. Now, without changing the original code of the program, add a user-defined function named originalOrder. The function receives the elements of array. Then, it writes the letters back to the screen in its original order. Figure 6.4 shows the expected modified final output of the Program 6.2. Answer the question (i) to (ii). (i) Provide C++ statement for: (a) function CALL to originalOrder (3 marks) (b) function PROTOTYPE of originalOrder (3 marks) (ii) Provide C++ fragment codes for function definition of originalOrder (4 marks) 3. Compile and run the completed modified program of Figure 6.2. Type computer. when asked for input. The program is expected to produce the following output (Figure 6.4). Enter up to 10 characters. (Enter to stop the input): computer. ------- Display in reverse order ------- retupmoc ------- Display in original order ------- computer Press any key to continue.. Figure 6.4: Expected output of modified Program 6.2 Practice 03: Two dimensional arrays (15 marks) 1. Study the program below to understand the task performed and how two-dimensional arrays are created. //Practice 6.3 //Demonstration of two-dimensional arrays #include #include using namespace std; const int NO_OF_ROWS = 2; const int NO_OF_COLS = 4; typedef float NewType [NO_OF_ROWS] [NO_OF_COLS]; //declares a new data type 1/ which is a 2 dimensional array of Floats NewType val; // defines val as a 2 dimensional array of NewType void getData(); //prototype of getData void displayData(NewType array); //prototype of displayData int main() { getData(); //call getData function and transfer nothing system ("pause"); return 0; } getData // // task: This function receive inputs from user // data in: None // data returned: None void getData() void getData() { int noof Input=0; cout > val[row_pos] [col_pos]; } displayData(val); //call displayData function and transfer array val } // displayData // task: This function displays all entered inputs // data in: the array containing val // data returned: none void displayData (NewType array) { for (int row_pos = 0; row_pos #include using namespace std; const int NO_OF_ROWS = 2; const int NO OF COLS = 4; typedef float NewType [NO_OF_ROWS] [NO_OF_COLS]; //declares a new data type // which is a 2 dimensional array of floats NewType val; // defines val as a 2 dimensional array of NewType void getData(); //prototype of getData void displayData(NewType array); //prototype of displayData 1/6.3(a) prototype of calculate int main() { getData(); //call getData function and transfer nothing cout> val[row_pos] [col_pos]; } 7 } displayData(val); //call displayData function and transfer array val } displayData // task: This function displays all entered inputs // data in: the array containing val // data returned: none //********* void displayData (NewType array) { for (int row_pos = 0; row_pos #include using namespace std; const int N = 10; void myProgram(void); //prototype of myProgram int main(void) { myProgram(); //calls myProgram and transfers nothing system ("pause"); return; } **** my Program function // Read up to 10 integer numbers // Then, write the numbers back to the screen in its reverse order. void myProgram(void) { const int noOfInput =10; int data=0; cout >data; } //Display the input in reverse order cout =0; i--) { cout using namespace std; void readChar(); //prototype for readChar function void reverseOrder (char let[], int last_index); //prototype for reversefunction int main() { readChar(); //call readChar function and transfer nothing cout >let[i]; //if . exit the loop if (let[i]=='.') break; //the last index of array let newIndex=i; } cout =0; j--) cout #include using namespace std; const int NO_OF_ROWS = 2; const int NO OF COLS = 4; typedef float NewType [NO_OF_ROWS] [NO_OF_COLS]; //declares a new data type 1/which is a 2 dimensional array of floats NewType val; // defines val as a 2 dimensional array of NewType void getData(); //prototype of getData void displayData(NewType array); //prototype of displayData int main() { getData(); //call getData function and transfer nothing cout> val[row_pos] [col_pos]; } } displayData(val); //call displayData function and transfer array val } displayData // task: This function displays all entered inputs // data in: the array containing val // data returned: none //********* void displayData (NewType array) { 14 for (int row_pos = 0; row_pos

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

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago