Captain: Sharmin

today's menu(30thOct')

1) Discuss the first question of the test as pasted below

2) Keith's demo on design implement a web system and e-commerce

 Data file for Part b

ebrahimi.txt                          

email  ebrahimi@....

office  d222

occupation   Prof.

Tlc

Ebrahimi.txt

ruan.txt

sharmin.txt

jean.txt

email....
tel...
webpage..

Raul.txt

email....
tel...
webpage..
major
favorites.

 

 

Q1a)Run A search program using a file containing series of names and emails (12pts).

Q1b) Run the above program with a file that contains names of files. Program opens each file and search for the particular search in the question. Show your data file as well (13 pts)

hint: chapter 12

 

Keith Wallace - website tutorial example

http://www.geocities.com/spudbundy/tutorial.html

HTML SOURCE CODE:

<script language="JavaScript">var PUpage="76001548"; var PUprop="geocities"; </script><script language="JavaScript" src="http://www.geocities.com/js_source/pu5geo.js"></script><script language="JavaScript"> var thGetOv="http://themis.geocities.yahoo.com/themis/h.php"; var thCanURL="http://us.geocities.com/spudbundy/tutorial.html"; var thSpaceId="76001548"; var thIP="137.139.152.34"; var thTs="1162246737"; var thCs="4949301cc2e6cc1cc99239098644a059";</script><noscript><link rel="stylesheet" href="http://themis.geocities.yahoo.com/jsoff.css?thIP=137.139.152.34&thTs=1162246737"></noscript><script language="JavaScript" src="http://us.geocities.com/js_source/geovck08.js"></script>
<!-- text above generated by server. PLEASE REMOVE -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<title>C++ Programming Easy Ways</title>
<body bgcolor=7C56A7>
<style type="text/css">

table, tr, td {border-width: 1px; color: #ffffff; font-family: verdana; font-weight: bold}
a:link {color: #C0C0C0; text-decoration: none}
a:visited {color: #FFFFFF; text-decoration: none}
a:hover {text-decoration: underline}

</style>

<!-- *** MAIN PAGE *** -->
<center>
<table border=1 align=top>
<tr>
<td colspan=2><h1>C++ Programming Easy Ways</h1></td>
</tr>

<tr>
<td valign=top>
<!-- *** MAIN MENU *** -->
<table border=1>
<tr>
<td><a href=chap01.html>lesson 01</a></a></td>
</tr>
<tr>
<td><a href=chap02.html>lesson 02</a></td>
</tr>
<tr>
<td><a href=chap03.html>lesson 03</a></td>
</tr>
<tr>
<td><a href=chap04.html>lesson 04</a></td>
</tr>
<tr>
<td><a href=chap05.html>lesson 05</a></td>
</tr>
<tr>
<td><a href=chap06.html>lesson 06</a></td>
</tr>
<tr>
<td><a href=chap07.html>lesson 07</a></td>
</tr>
<tr>
<td><a href=chap08.html>lesson 08</a></td>
</tr>
<tr>
<td><a href=chap09.html>lesson 09</a></td>
</tr>
<tr>
<td><a href=chap10.html>lesson 10</a></td>
</tr>
<tr>
<td><a href=chap11.html>lesson 11</a></td>
</tr>
<tr>
<td><a href=chap12.html>lesson 12</a></td>
</tr>
</table>

</td>
<td valign=top>

Features of this book:
<ul>
<li>Exploring easy ways to learn programming in C++</li>
<li>Makes the most difficult programming concepts understandable</li>
<li>Eases transition from C language to C++</li>
<li>Invites readers to participate and interact</li>
<li>Presents materials from different angles</li>
<li>While it is for beginners, it includes something for everyone</li>
<li>Knows what is important and what is not, does not overwhelm the reader</li>
<li>Includes practical ready to run practices with input and output</li>
<li>Forwards many first hand ideas and opinions</li>
<li>Offers meaningful examples and programs</li>
<li>Combines both procedural and object-oriented programming</li>
<li>Covers STL in an easy and useful manner</li>
<li>Applies Web programming with C++</li>
<li>Covers STL in an easy and useful manner</li>
</ul>

</td>
</tr>
</table>
</center>

</body>
</html><!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet>
<link href="http://us.geocities.com/js_source/div.css" rel="stylesheet" type="text/css"><script language="JavaScript" src="http://us.geocities.com/js_source/div03.js"></script><script language="JavaScript" src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="http://geocities.com/js_source/geov2.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.geocities.yahoo.com/visit.gif?us1162246737" alt="setstats" border="0" width="1" height="1"></noscript>
<IMG SRC="http://geo.yahoo.com/serv?s=76001548&t=1162246737&f=us-w73" ALT=1 WIDTH=1 HEIGHT=1>

Colorsafe

http://www.hitmill.com/html/color_safe.html

Ally's proj

Part A is correct

#include <iostream>

#include <fstream>

#include <string>

using namespace std;

class person{

private: char name[25];

char email[25];

ifstream fin;

public: person(){fin.open("email.txt");}

~person(){fin.close();}

int search(char[]);

};

int person::search(char searchname[]){

while(fin>>name>>email)

if(strcmp(searchname,name)==0){

cout<<"Found "<<endl;

cout<<"Name: "<<name<<endl<<"Email:"<<email<<endl;

return 1; }//IF

cout<<"Not Found "<<endl;

return 0; }//SERACH

void main(){

person email;

char nametosearch[25];

cout<<"Enter Name to Search:";

cin>>nametosearch;

email.search(nametosearch); }//MAIN

 

 

Jean Ednick Part A is done and correct

#include <fstream>
#include <iostream>
using namespace std;
int main ()
{
char searchname[30], itemname[30], associateitem[30];

cout<<endl<<"ENTER THE SEARCH NAME: ";
cin>>searchname;

ifstream fin("name");
while(fin>>itemname>>associateitem)
{
          if(strcmp(searchname,itemname)==0)
{
          cout<<associateitem<<endl;
          return 0;
}
}
cout<< "Not found";
return 0;
}