Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

COMPLETED TEST PLAN

Test Case # Input Expected Output Actual Output Did the test pass?
Bob Bob Bob
10 10
2.5 2.5
5
1 25 25 YES
2.23607 2.23607
8 2 2
3 2.66667 2.66667
Alice Alice Alice
20 20
5 5
10
2 100 100 YES
3.16228 3.16228
5 2 2
2 2.5 2.5
Rayyan Rayyan Rayyan
16 16
4 4
8
3 64 64 YES
2.82843 2.82843
9 2 2
4 2.25 2.25
Hassan Hassan Hassan
6 6
1.5 1.5
3
4 9 9 YES
1.73205 1.73205
3 1 1
2 1.5 1.5
PSEUDOCODE
Ask the User’s name.
Ask the user's favorite number.
Work on the favorite number.
 Multiply the number by 2
 Divide the number by 2
 Square the number
 Square root of the number
Display the fun facts about the favorite number.
 Double of the number
 Half of the number
 Square of the number
 Square root of the number
Ask the user for two whole numbers.
Work with the 2 whole numbers.
 Divide the first whole number by the second whole number using integer
division.
 Divide the first whole number by the second whole number using floating
point division.
Display the division section.
 Whole number 1 divided by whole number 2 using integer division.
 Whole number 1 divided by whole number 2 using floating point division.

FLOWCHART
A
START

Display a Read the Whole


message “What Number.
is your name?”

Display a message
Read name. “Give me another
whole number.”

Display a message
“What is your Read the second
favorite number?” whole number.

Read the Divide:


favorite number. 1) Whole Number 1 by Whole
number 2 using integer division.
2) Whole Number 1 by Whole
Number 2 using floating point
Calculate: division.
1) The double of the favorite number.
2) The half of the favorite number.
3) The square of the favorite number.
4) The square root of the favorite number. Display:
1) Whole number 1
divided by whole
Display: number 2 using integer
1) The double of the favorite division.
number. 2) Whole number 1
2) The half of the favorite divided by whole
number. number 2 using
3) The square of the favorite floating point division.
number.
4) The square root of the
favorite number.

Display a message
“Give me a whole
number.”

A LESSONS LEARNED
Q1) Write about your Learning Experience, highlighting your lessons learned
and learning experience from working on this project.
Ans) While working on this project I just compiled every piece of knowledge that
I learned so far in this course. In this project the following topics were tested out
of all the other topics:
 The Parts of a C++ Program
 The COUT function
 The CIN function
 The different data types
 Variables, Assignments, and Initialization
 Arithmetic Operators
 Mathematical Functions
 Type Casting
 Hand Tracing a Program

Q2) What have you learned?


Ans) Till now we have covered the following topics:
 The Parts of a C++ Program
 Comments
 The preprocessor directive
 The namespace
 The main function
 The statements
 The end statement
 The syntax
 The punctuation
 The COUT function
 Starting New line in COUT function
 Escape Charaters
 The CIN function
 Entering Multiple values
 GETLINE(CIN, )
 CIN.GET()
 CIN.IGNORE()
 .LENGTH()
 The different data types
 Integer
 Double
 Float
 E notation
 Character
 String
 The Header file for Strings
 Bool
 Named Constants
 Determining the size of data type
 Variables, Assignments, and Initialization
 Declaring Variables
 Assignment statements
 Multiple assignments
 Initialization
 Identifier Rules
 Auto data type
 Arithmetic Operators
 +
 -
 *
 /
 %
 Mathematical Functions
 COS
 SIN
 TAN
 ABS
 FMOD
 LOG
 LOG10
 ROUND
 SQRT
 Random Numbers
 Random Numbers Header File
 Type Casting
 Formatting Output
 The formatting Header File
 SETPRECISION()
 FIXED
 LEF
 RIGHT
 SETW()
 SHOWPOINT
 Hand Tracing a Program

Q3) What did you struggle with?


Ans) I struggled with some of the CIN functions. Not in this project but other
that it also I am not able to clearly understand the application and process of
use of the following CIN function.
Cin.get()
Getline(cin, )
Cin.ignore

Q4) What would you do differently on your next project?


Ans) I am not pretty sure but, in my opinion, I would use formatting functions
because in this project the formatting output functions were not used at all. And
of course, I will use the If function also which I am desperate to learn because in
my opinion if functions are the functions that make up the branches in a
program and using if functions in much more enjoyable than just writing
sequential programs, So I am so excited for the upcoming projects. But I expect
a much more difficult project so that it should be a challenge for us. This project
was a piece of cake. The projects should be long, descriptive, and difficult so that
it could be a good opportunity for the students to enjoy their hard work.

Q5) What parts of this assignment were you successful with, and what parts (if
any) were you not successful with?
Ans) I was successful with everything. Nothing was difficult.

Q6) Provide any additional resources/links/videos you used to while working


on this assignment/project.
Ans) No I didn’t use anything. The project was so easy. It didn’t require the use
of anything.

You might also like