Object-Oriented Programming Implementation and Testing

Verified

Added on  2024/04/24

|51
|4099
|332
AI Summary
This report covers the implementation of object-oriented programming solutions, testing methodologies, feedback evaluation, and recommendations for improvement. It includes detailed figures, testing scenarios, and on-screen help creation.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Contents
LO3 is the implementation of object-oriented programming......................................................................3
Implementation of an objected oriented solution on the design prepared [P3.1, M2]...........................3
Standards of Programming with commenting on effective code [P3.2]................................................12
Implement object behaviors using control structures to meet the design algorithms [P3.3, D2].........20
Make effective use of an Integrated Development Environment (IDE), including code and screen
templates [P3.4]....................................................................................................................................23
LO4 Be able to test and document object-oriented programming solutions............................................29
Critically reviews and test an object orientated programming solution you developed for the given
scenario [P4.1].......................................................................................................................................29
Analyze actual test results against expected results to identify discrepancies [ P 4.2]..........................40
Evaluate independent feedback on a developed objects oriented programmer solution and make
recommendations for improvements [P4.3].........................................................................................43
Create on-screen help to assist the users of a computer program [P 4.4].............................................44
Create documentation for the support and maintenance of a computer program [P4.5]....................47
Conclusion.................................................................................................................................................51
Lists of figures:
Figure 1coding of Main Class.......................................................................................................................3
Figure 2 coding of Login Page......................................................................................................................3
Figure 3 coding of Registration page...........................................................................................................4
Figure 4coding of Standard Calculator page................................................................................................6
Figure 5 coding of Scientific Calculator page...............................................................................................8
Figure 6 coding of Programmer Calculator page.......................................................................................10
Figure 7 coding of Programmer Calculator page.......................................................................................12
Figure 8 Naming Conventions....................................................................................................................12
Figure 9 Multiline Comments....................................................................................................................13
Figure 10 Multiline Comments stating the beginning of entry point of application.................................14
Figure 11 Comments stating the array to be returned to the registered users.........................................14
Figure 12 Comments stating the validation, checking the length of entered string and performing the
numeric calculation...................................................................................................................................15
Figure 13 Comments stating the conversation of decimal to binary, decimal to hexadecimal and
performing each and specific calculation in programmer calculator.........................................................15
Figure 14 Comments for storing values in the array and performing calculation......................................16
Figure 15 Comments for Performing mean and median...........................................................................17

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Figure 16 Comments for sine cosine and tangent calculation in scientific calculator................................17
Figure 17 Comments for addition subtraction, square-root, division and multiplication in the standard
calculator...................................................................................................................................................18
Figure 18 Comments for checking performed operation in the standard calculator.................................19
Figure 19 Event Handling...........................................................................................................................19
Figure 20 initializing an array for registering users....................................................................................20
Figure 21 if else code in program..............................................................................................................21
Figure 22 Switch-case code in program.....................................................................................................21
Figure 23 for each loop code in program...................................................................................................22
Figure 24 while loop code in program.......................................................................................................22
Figure 25 For-Loop code in program.........................................................................................................23
Figure 26 Visual Studio IDE........................................................................................................................23
Figure 27 Login page..................................................................................................................................24
Figure 28 Register Page.............................................................................................................................24
Figure 29 after logging window.................................................................................................................25
Figure 30 Registered user window............................................................................................................26
Figure 31 Calculator options......................................................................................................................26
Figure 32 StandardCalculator....................................................................................................................27
Figure 33 ScientificCalculator....................................................................................................................27
Figure 34 ProgrammerCalculator..............................................................................................................28
Figure 35 AdvanceCalculator.....................................................................................................................29
Figure 36 Test case 1: login page...............................................................................................................31
Figure 37 test case 2: registration.............................................................................................................32
Figure 38 List of registered users...............................................................................................................32
Figure 39 Testing for invalid username or password.................................................................................34
Figure 40 after logging in this will show up...............................................................................................34
Figure 41 option page for calculator..........................................................................................................35
Figure 42: calculator page.........................................................................................................................36
Figure 43 giving input to calculate the result.............................................................................................36
Figure 44 calculated area and perimeter...................................................................................................37
Figure 45: input entered............................................................................................................................38
Figure 46 output.......................................................................................................................................38
Figure 47 test case 1login page.................................................................................................................41
Figure 48: test case 2Registration page.....................................................................................................41
Figure 49 test case 3 Registration..............................................................................................................42
Figure 50 test case 4Login page.................................................................................................................42
Figure 51 test case 5List page....................................................................................................................43
Figure 52 login page..................................................................................................................................45
Document Page
LO3 is the implementation of object-oriented
programming
Implementation of an objected oriented solution on the design
prepared [P3.1, M2]
Figure 1coding of Main Class
Document Page
Figure 2 coding of Login Page
Figure 3 coding of Registration page

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Document Page
Figure 4coding of Standard Calculator page
Document Page

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 5 coding of Scientific Calculator page
Document Page
Document Page
Figure 6 coding of Programmer Calculator page

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Document Page
Figure 7 coding of Programmer Calculator page
Document Page
Standards of Programming with commenting on effective code
[P3.2]
Naming Conventions: This is the default convention given by the compiler when creating a new
project. If the name is much longer for a single line then it is extended by. (Dot). The name of
the object must not be changed, especially when Visual Studio provides it.
Figure 8 Naming Conventions
Layouts: it not only highlights the code structure but also make the programmer understand what
the code is coded about. Steps for these are:-
Single line comments to let programmer know about each line.
Single line Declarations.
Spaces should be given between the classes, methods, and functions to make it more
indented.
Commenting: sometimes the code is hard to understand, here comes the solution, commenting
helps us to remember what we have coded about. Basically, it creates the label
Multiline comments: this is basically used when we have to comment on more than one line.
It is started from /* and ended with */ .the better understanding would be cleared by the
following figure:-
NAMING
CONVENTIONS
Commenting Conventions

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 9 Multiline Comments
Figure 10 Multiline Comments stating the beginning of entry point of application
Document Page
Figure 11 Comments stating the array to be returned to the registered users.
Figure 12 Comments stating the validation, checking the length of entered string and performing the numeric calculation.
Document Page
Figure 13 Comments stating the conversation of decimal to binary, decimal to hexadecimal and performing each and specific
calculation in programmer calculator
Figure 14 Comments for storing values in the array and performing calculation

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Figure 15 Comments for Performing mean and median.
Document Page
Figure 16 Comments for sine cosine and tangent calculation in scientific calculator
Figure 17 Comments for addition subtraction, square-root, division and multiplication in the standard calculator.
Document Page
Figure 18 Comments for checking performed operation in the standard calculator.
Event Handling: if event handler is defined in the code then lambda expression is only used.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 19 Event Handling
Arrays: the collection of data of same types are called array.
Figure 20 initializing an array for registering users
Document Page
Implement object behaviors using control structures to meet
the design algorithms [P3.3, D2]
Nothing can't happen without making a decision even if we are talking about the programming
language. These decision-making statements are called control flow statements.
IF-else statements:
Figure 21 if else code in program
Switch-Case:
Document Page
Figure 22 Switch-case code in program
For-Each loop:
Figure 23 for each loop code in program
While loop:

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Figure 24 while loop code in program
For-Loop:
Figure 25 For-Loop code in program
Make effective use of an Integrated Development Environment
(IDE), including code and screen templates [P3.4]
For developing the scientific calculator with c# we used Visual studio Professional 2013. This is
the compiler provided by Microsoft for developing applications for Windows and web platform
with dot net framework. It is also used for many other languages such as JavaScript and Python.
Document Page
Figure 26 Visual Studio IDE
Running of the program:
Starting with the executable file. Double click on the program.exe a page will open asking for
username and password, enter admin as username and admin as password. Or we can also
register a new user.
Figure 27 Login page
Document Page
To register ourselves as a new user we have to fill the following details:
Figure 28 Register Page
The user can now log in with the username and password as registered by him.
After successful login the page will appear asking for details either you want to use a calculator
or you want to see registered users.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 29 after logging window
When you click the approve users. This windows will pop out:
Figure 30 Registered user window
And when we click on calculator another window with four option will pop out:
Document Page
Figure 31 Calculator options
On clicking on standard calculator this will pop out:
Figure 32 standard calculator
Or if we click on scientific calculator this shows up
Document Page
Figure 33 ScientificCalculator
If clicked on programmer this is showed up
Figure 34 ProgrammerCalculator

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Or if we click advance calculator then this one,
Figure 35 AdvanceCalculator
LO4 Be able to test and document object-oriented
programming solutions
Critically reviews and test an object orientated programming
solution you developed for the given scenario [P4.1].
We are going to discuss the various techniques used for testing. These are given below:
1) White-box testing: This is also called the software testing technique. In this testing we,
basically test the application externally, i.e. is it working fine or not. Is its layout good
enough, is it giving proper output or not. This whole testing is done externally that is why
it is called software testing. This testing is done by validation of numbers and reading out
whether the output is right or wrong. This testing is also done to test the layout of the
application. This is testing which is done externally. (Softwaretestingfundamental, 2010).
Document Page
2) Black-Box Testing: In this testing method testers usually test the non-functional and
functionality of the program by giving inputs and predicting results based on the
calculated output. This testing is done to find out the bugs in the code to make the code
error free by properly testing each and every method, interfaces, functions, and classes.
So the testing done inside the coding to know the bugs and error in the coding part is
called black hat testing. (Guru99, 2018).
3) Requirement Testing: In this type of testing, test cases are prepared on the modules of
the software or the requirement given by the user. Then test cases are prepared and
testing is done.
4) Design testing: this testing is done how the program will look. Testing cases are prepared
on the bases of the screen size, whether the designs look good and professional or it is
well indented, these all testing techniques based on the designing of the software is called
design testing. Responsive design testing is also part of this testing.
5) Implementation testing: This is the testing process in which it is tested, in which
environment the application or software is properly working. Basically, it is used to find
out the specific system requirement. This is used for creating the test cases whether it is
implemented on the particular set of the operating system.
6) System compatibility: this is done to make surety of the software or web app to its
system compatibility with hardware and other various platforms as a web browser in case
of the web app. A feature of application or system is tested in this testing technique.
7) Load Testing: the load testing gives us the knowledge of the load bearing of our
application, i.e. how much loadout application or software can take. Or how the much
larger file can it take as input and many other such cases.
8) Input Testing: This is the software testing technique. In this testing method, the input
validation is used to test the application and the software by giving the proper input and
calculate the result and checking, whether the result is correct or not.
White box testing: implementation is included in white box testing. We can also say that it is the
part of white-box testing. In this testing understanding the application and testing it with all
possible outputs so as to find out each and everything is working great or not. All type of
validations is also done in it.(Guru99,2018).
Document Page
Table 1 white-box testing
S no Test Scenario Expected Result Actual result
1 Login page: check
whether username and
password are correct
or not.
Login page with
username and
password box.
Done Successfully
2 Registration: the user
has to register first for
doing the further task.
The page will pop up
asking for registration
details.
Done Successfully
3 Calculator page Page with multiple
calculator options
Done Successfully
Figure 36 Test case 1: login page.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 37 test case 2: registration
Document Page
Figure 38 List of registered users
Black box testing: Also called behavioral testing. Testing each and every module with
validation and possible outcomes.
Table 2 Black-box testing
Requirement Given Input Achieved output Results
Login Username and
password
Displaying registered
users and calculators
PASS
User Registration Enter username and
password and click on
register
Taking you back to
login page
PASS
Standard mode Click on standard Standard mode will
be opened up.
PASS
Scientific mode Click on Scientific The scientific mode
will be opened up.
PASS
Programmer mode Click on programmer Programmer mode
will open up
PASS
Advance mode Click on Advance Advance mode will
open up
PASS
Document Page
Logout Click on logout It will take you to the
login page.
Input testing for the proposed advanced scientific calculator:
Figure 39 Testing for invalid username or password
When correct details are entered then option page opens up asking you for calculator page and
Registered users page. While the username=”admin” and password=”admin” for this application.
Figure 40 after logging in this will show up.

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
After clocking on calculator option page show up asking you the type of calculator you want to
open.
Figure 41 option page for calculator
Now testing the advanced calculator
On clicking the advance, this page will open up.
Document Page
Figure 42: calculator page.
When numbers are put in the calculation field and users calculate it. Then it gives the correct
result, supposes user wants to calculate the area and perimeter of the square.
Figure 43 giving input to calculate the result.
Document Page
On clicking equal to the button(=) the out will be shown. Showing area and perimeter of a square
having side 8. And this is correct.
Figure 44 calculated area and perimeter.
Load testing: I do performance testing to calculate the load of the program and it is working fine
and giving the correct result. So I have also performed load testing. .To checks how much load it
can handle.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Find sine
Figure 45: input entered
Figure 46 output
Document Page
Review
Table 3: user review table
Review statement User Review
Enjoyed this application.? How much? ****
Satisfied with how from the application ***
Level of understanding of all operations ****
Response time speed of calculator ****
Are we to mark according to you? *****
Complaints handling ***
Level of easiness ****
Documentation provided technically ****
Correctness *****
We can determine different areas such as accuracy of the software, different assumptions,
possibilities and the real-time situations by performing testing on this object-oriented program.
By this, we can keep a check on the fact whether the output generated is in accordance with the
requirements provided by the user. There are four different ways of performing testing:
Unit testing: The verification of the functionality of a given code is done at this level.
The unit testing in this program has been performed at the level of class.
Integrated testing: This type of testing is performed on components and the design of
the system to check the compatibility and interface between the two. The possible defects
in the interface and the compatibility among the components had been marked by
performing this testing in this program (Techopedia, 2018).
System testing: To verify whether our system’s requirements have been fulfilled or not,
we perform system testing. Successful testing of the system has been done in the
program.
Document Page
Operational Acceptance testing: This testing is performed to check the activeness of the
calculations deployed in the program. For testing whether the behavioral and portability aspects
of the calculator are fine, this testing has been performed
Analyze actual test results against expected results to identify
discrepancies [ P 4.2]
Table 4: Table of test scenario and their results
S No Test scenario Expected results Results
1 Login page consist of
registration and
admin login
Login page with
username and
password will be
there
Successfully done
2 Registration page, for
further use, user has
to register
It will ask user for
basic details
Successfully done
3 Register page: it has
the list of all
registered users
It shows the
registered users
Successfully done
4 Login page: use
username and
password while
registering
Use correct username
and password
otherwise invalid
username and
password will be
shown
Successfully done
5 Fill up all the data
asked by registration
page.
Login page should
appear
Successfully done
6 Calculator list page:
should appear having
list of all calculator
it will show up after
logging in
successfully
Successfully done
7 Successfully done

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Figure 47 test case 1login page
Figure 48: test case 2Registration page
Document Page
Figure 49 test case 3 Registration
Figure 50 test case 4Login page
Document Page
Figure 51 test case 5List page
Evaluate independent feedback on a developed objects
oriented programmer solution and make recommendations for
improvements [P4.3].
Feedback from the customers:
Table 5: feedback from customers
1. Will you tell your friend about this
calculator?
User 1: of cos, so smooth, and very easy to
understand.
User 2: surely, he too can solve big
problems in seconds.
User 3-: why not its very friendly.
2. How much you like it in more than one
word?
User 1: very smooth and easily used by
everyone
User 2: it helped me a lot with my
complex operations.
User -3: not only well managed but also
secured.

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
3. The most frustrating thing in this? User-1: just perfect.
User-2: just in case when you forgot the
password.
User-3: registration consumes time.
4. how easily can this application be
accessed?
User 1-: easy
User -2: handled easily
User-3: 1 out 10 time gets complex.
5. how we can improve it? User-1: it's not a mobile app.
User-2: not supported by windows 7.
User-3: for me perfect.
Recommendations:
For retrieval of the information quickly and reducing the time complexity, the temporary
database of the user has to be maintained.
The increment in the calculations' speed has to do for complementing the extra time taken by
mistakes in programming.
For avoiding mistakes in user login page, there should be hints in the background.
The warning or the error dialogue box should disappear on selecting OK.
Font size must be properly visible.
Windows 7 should also support this file.
Name and password should be made without any rules and regulations.
Create on-screen help to assist the users of a computer
program [P 4.4]
On-screen help: It helps the user about any query related to the application. There are various
types of on-screen help basically 7, which are:
Help heroes
Book type help-screen
Help wizards
Document Page
Web helps
Classical help
Help tutorials
Helping videos
Advantages
Cheap and it is cost-free.
Easy and It gets fast updated from the cloud.
Contains information and without loads (Prc.,1998).
Implemented on-Screen Help
This help section provides the information, the basic information about the calculator.
Such help, that there are only four modes of the calculator:
Standard
Scientific
Programmer
Advance
Document Page
This four mode of the calculator is used to perform some of the basic operations that are used in
day to day life and make some sort of calculations easier.
Standard mode: this mode is used to do some of the basic calculations such as addition,
subtraction, division, multiplication, square root and power of, functionalities.
Scientific mode: this mode is used to perform calculations such as sine, cosine, tangent,
mean, mode, median.
Programmer mode: this is used to do conversion like binary to decimal, decimal to
binary, decimal to hexa-decimal, decimal to octal.
Advance mode: this is used to find out the area and perimeter of 2d objects such as circle,
rectangle, square and triangle and 3d object as a cube.
Then comes the login help tab, let us suppose someone having trouble in logging in. then he
should know the username and password of admin, or we can say the default login if or
password. So that he can log into the system and use the calculator without any trouble.

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Create documentation for the support and maintenance of a
computer program [P4.5].
This program is written for designing a calculator which would enable the users to perform
various types of mathematical calculations very quickly. Different advanced functions are also
incorporated in this calculator. Different modes of ASC are as follows:
Standard Mode: The operations such as addition, subtraction, division, multiplication
and finding square root are done.
Scientific Mode: Various types of trigonometric calculations can be done in this mode.
Programmers Mode: Different types of conversions can be performed in this mode. For
example, decimal to binary conversion.
Advanced Mode: Various functions such as calculating area and perimeter of shapes
such as square, rectangle and triangle can be performed.
For making the use of the calculator, the user has to register first. They can register through the
admin panel present on the front page. There are two options, first Register and second Login
present on this page. For new users who are first visiting will have to register first through the
Register option. Basic credentials of the user are needed. For the users who have already
registered, they can proceed with the Login by entering their username and password.
Document Page
Figure 52 login page
Figure 53 After successful login
Username should be
entered here
Password should be entered
her
New user should click her
For logging out click here
For calculators click here
For watching approved users click
here
Document Page
Figure 54 registered user login page
Enter username for new
user
Enter password for new
users

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Figure 55 Calculator page
For standard calculator
For programmer calculator
For scientific calculator
For advance calculator
Document Page
Conclusion
The conclusion contains the basic things done in the report. The C# console application was
developed on IDLE. Basic UML diagrams such as use case, activity and sequential have been
drawn which provides the basic information about the relationship among objects. Explanation
of the testing carried out using Microsoft Visual Studio is also done. The code has been made
consistent with the use of various coding languages.
1 out of 51
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]