-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathoexpl-testprograms.html
234 lines (224 loc) · 7.7 KB
/
oexpl-testprograms.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!Doctype html>
<html lang="en">
<head>
<title>OEXPL TEST PROGRAMS</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header class="center clearfix" id="navtop"> <a href="index.html" class="logo fleft"><img src="img/logo.png" alt=""></a>
<nav class="fright">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="roadmap.html">Roadmap</a></li>
<li><a href="documentation.html" class="navactive">Documentation</a></li>
</ul>
</nav>
</header>
<div class="about center part clearfix">
<header class="title">
<h3 class="fleft">Contents</h3>
</header>
<body>
<aside class="column4 mright">
<menu>
<ul>
<li><a href="#test1" class="sec">Test Program 1</a></li>
<li><a href="#test2" class="sec">Test Program 2</a></li>
<li><a href="#test3" class="sec">Test Program 3</a></li>
<li><a href="#test4" class="sec">Test Program 4</a></li>
<li><a href="#test5" class="sec">Test Program 5</a></li>
<li><a href="#test6" class="sec">Test Program 6</a></li>
<li><a href="#test7" class="sec">Test Program 7</a></li>
<li><!--For blank space between lins and download button--> </li>
<!-- <li><a href="https://github.com/silcnitc/documentation/blob/master/lex/Lex.pdf?raw=true" class="button"> Download as PDF </a></li> -->
<li><!--Blank line for space between download button and main title--> </li>
</ul>
</menu>
</aside>
<section class="columnthird content"><h2 class="mright">OEXPL TEST PROGRAMS</h2>
<article id="test1" class="detail">
<h4>Test Program 1 : Binary Search Tree</h4>
<p>
This test program inserts elements into a binary search tree and prints the elements in inorder, preorder and postorder traversal. The program stops taking input elements (that are to be inserted in Binary Search Tree) when the user enters 0.
</p>
<p>
<b> Input </b> : The elements that are to be inserted into a Binary Search Tree and a 0 at last (indicating the end of input).
</p>
<p>
<b> Output </b> : The inorder, preorder and postorder traversal of the tree.
</p>
<p>
This program test the iteration, recursion, conditional, arrays and passing of user-defined datatype as return value of function.
</p>
<p> The code for the test progam can be found <a href="oexpltestprograms/test1.html" target="_blank">here</a>
</article>
<article id="test2" class="detail">
<h4>Test Program 2 : Linked list</h4>
<p>
This test program reads elements into a linked list and prints them.
</p>
<p>
<b> Input </b> : Value of length of list and list of values from standard input.
</p>
<p>
<b> Output </b> : The list of values stored in linked list.
</p>
<p>
This program test the working of dynamic memory allocation functions like Initialize(), Alloc() and Free().
</p>
<p> The code for the test progam can be found <a href="oexpltestprograms/test2.html" target="_blank">here</a>
</article>
<article id="test3" class="detail">
<h4>Test Program 3 : Sum of Factorials</h4>
<p>
This test program reads an element and finds the sum of factorials of all the numbers till that element.
</p>
<p>
<b> Input </b> : Value of n.
</p>
<p>
<b> Output </b> : Sum of factorials of all the numbers till n.
</p>
<p>
This program tests the declaration of a member field which is an object of another class.
This program also tests the recursion, parameter passing, calling a function inside the call of another function.
</p>
<p> The code for the test progam can be found <a href="oexpltestprograms/test3.html" target="_blank">here</a>
</article>
<article id="test4" class="detail">
<h4>Test Program 4</h4>
<p>
This program tests the runtime binding of the variables of a class.
</p>
<p>
<b> Input </b> : If any input > 0
</p>
<p>
<b> Output </b> : <br> In A F1
<br> 0
</p>
<p>
<b> Input </b> : If any input <= 0
</p>
<p>
<b> Output </b> : <br> In B F1
<br> 1
</p>
<p>
This program uses the concepts of inheritance and subtype polymorphism.
</p>
<p> The code for the test progam can be found <a href="oexpltestprograms/test4.html" target="_blank">here</a>
</article>
<article id="test5" class="detail">
<h4>Test Program 5</h4>
<p>
This program tests the correct set up of the virtual function table by the compiler.
</p>
<p>
<b> Input </b> : If n < 0
</p>
<p>
<b> Output </b> : In A F0
</p>
<p>
<b> Input </b> : If n == 0
</p>
<p>
<b> Output </b> : In B F0
</p>
<p>
<b> Input </b> : If n > 0
</p>
<p>
<b> Output </b> : In C F0
</p>
<p>
This program uses the virtual function table, inheritance and subtype polymorphism.
</p>
<p> The code for the test progam can be found <a href="oexpltestprograms/test5.html" target="_blank">here</a>
</article>
<article id="test6" class="detail">
<h4>Test Program 6</h4>
<p>
This program tests the implementation of inheritance and subtype polymorphism.
</p>
<p>
<b> Input </b> : <br>1
<br>length
<br>breadth
</p>
<p>
<b> Output </b> : length * breadth
</p>
<p>
<b> Input </b> : <br>2
<br>length
</p>
<p>
<b> Output </b> : length * length
</p>
<p>
This test program uses the concepts of inheritance.
</p>
<!--oexpltestprograms/test6.html-->
<p> The code for the test progam can be found <a href="oexpltestprograms/test6.html" target="_blank">here</a>
</article>
<article id="test7" class="detail">
<h4>Test Program 7</h4>
<p>
This program tests the implementation of inheritance and subtype polymorphism.
</p>
<p>
<b> Input </b> : > 0
</p>
<p>
<b> Output </b> : <br>Rogers
<br>37
</p>
<p>
<b> Input </b> : <= 0
</p>
<p>
<b> Output </b> : <br>Mathew
<br>35
<br>999
<br>CS
</p>
<p>
This program tests the concepts of inheritance, subtype polymorphism and virtual function table.
</p>
<!--oexpltestprograms/test6.html-->
<p> The code for the test progam can be found <a href="oexpltestprograms/test7.html" target="_blank">here</a>
</article>
</section>
</body>
<footer class="center part clearfix">
<ul class="social column3 fleft">
<li><a href="https://github.com/silcnitc">Github</a></li>
<li> <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
<img alt="Creative Commons License" style="border-width:0" src="img/creativecommons.png" /></a></li>
</ul>
<!-- <div class="up column3 mright"> <a href="#navtop" class="ir">Go up</a> </div> -->
<div class="up column3" style="color: black;">
<p style="font-weight: bold;">Contributed By : <a href="#">J.Ritesh</a> <br>        <a href="#">J.Phani Koushik</a><br>         <a href="#">M.Jaya Prakash</a>
</p>
</div>
<nav class="column3">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<!-- <li><a href="uc.html">Contact</a></li> -->
</ul>
</nav>
</footer>
<!-- Javascript - jQuery
<script src="http://code.jquery.com/jquery.min.js"></script>-->
<script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="js/selectivizr.js"></script>
<![endif]-->
<script src="js/scripts.js"></script>
<script src="js/inject.js"></script>
</html>