Hello guys! im a Totaal and i need help anyone and Very Very Thx about "Airline Reservation System"??ref(Internet and WWW How to Programe 2nd).
below is the case and i hope someone can help me.. thx..

12.23 (Text Analysis) The availability of computers with string manipulation capabilities has resulted
in some rather interesting approaches to analyzing the writings of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars believe there is substantial evidence indicating that Christopher Marlowe or other authors actually penned the masterpieces attributed to Shakespeare. Researchers have used computers to find similarities in the writings of these two authors. This exercise examines three methods for analyzing texts with a computer.
a) Write a script that reads several lines of text from the keyboard and prints a table indicating the number of occurrences of each letter of the alphabet in the text. For example, the phrase
To be, or not to be: that is the question:
contains one “a,” two “b’s,” no “c’s,” etc.
b) Write a script that reads several lines of text and prints a table indicating the number of one-letter words, two-letter words, three-letter words, etc. appearing in the text. For example,
the phrase Whether 'tis nobler in the mind to suffer
c) Write a script that reads several lines of text and prints a table indicating the number of occurrences of each different word in the text. The first version of your program should include the words in the table in the same order in which they appear in the text. For example, the lines To be, or not to be: that is the question:
Whether 'tis nobler in the mind to suffer contain the words “to” three times, the word “be” two times, the word “or” once, etc. A more interesting (and useful) printout should then be attempted in which the words are sorted alphabetically.

Recommended Answers

All 5 Replies

  1. Are you expecting everyone to have this book and know what you talking about? That is impossible.
  2. Your 2nd edition is year 2000 version. Why don't you use the latest one 4th edition? Or perhaps 3rd? Technologies in 2nd edition are nearly decade old, which is a lot.
  3. Is this a Java Server Pages assignment or JavaScript assignment?
  4. We only give homework help to those who show effort

As expected, it is JavaScript assignment!

Moving to JavaScript section.

PS:If you read the chapter 12 plus chapter 11 you should be able to solve it easily...

Hi peter and totaal,

- totaal

i am not sure if this will claim what you really need over your project, but i hope this will help you in some other ways.

Here's the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>www.daniweb.com</title>
<style type="text/css">
<!--
textarea {
  letter-spacing : 2px }

-->
</style>
<script type="text/javascript">
<!--

var evaluate = function() {
   if ( document.createElement ) {
   var txt = document.getElementById( "phrase" ).innerText;
   var table = document.createElement("table");
   table.cellPadding = 7;
   table.frame = "box";
   table.rules = "all";
   var addCell = function( xRow, label ) {
   xRow.insertCell( -1 ).appendChild( document.createTextNode( label ));
   } 
   var tbody = document.createElement("tbody"); 
   table.appendChild( tbody );
   var row = tbody.insertRow( -1 );
   row.setAttribute("style", "background-color : #C0C0C0; font : bold 80% Verdana;" );
   var row1 = tbody.insertRow( -1 );
   var row2 = tbody.insertRow( -1 );
   var lcount = [ ] 
   var ucount = [ ];
   var count = [ ];
   var wcount = txt.match(/[a-zA-Z\']+(?=[\s\.])/g );
   var extract;
   var alphabet = "abcdefghijklmnopqrstuvwxyz";
   addCell( row, "Letters:" );
   addCell( row1, "Lcase:" );
   addCell( row2, "Ucase:" );
      for ( var i = 0; i < alphabet.length; i++ ) {
      lcount[ i ] = new RegExp( alphabet[ i ] + "+", "g" );
      ucount[ i ] = new RegExp( alphabet[ i ].toUpperCase() + "+", "g" );
      count[ i ] = txt.match( lcount[ i ] ) || 0;
      extract = (( count[ i ] ) ? String( count[ i ] ).split(",").length : "-" );
      addCell( row, alphabet[ i ].toUpperCase() );
      addCell( row1, extract );
      count[ i ] = txt.match( ucount[ i ] ) || 0;
      extract = (( count[ i ] ) ? String( count[ i ] ).split(",").length : "-" );
      addCell( row2, extract );
      } row2 = tbody.insertRow( -1 );
   addCell( row2, "Word-count:");
   addCell( row2, wcount.length );
   var wcell = row2.insertCell( -1 );
   wcell.innerHTML = "";
   for ( var x = 0; x < wcount.length; x++ ) {
      wcell.innerHTML += "#" + (( x ) + 1 ) + " <b>[</b> <span style=\"color : #f50\">" + wcount[ x ] + "</span> <b>]</b><br>\n";
   } row2.cells( 2 ).setAttribute("colspan", i );
   return document.body.appendChild( table );
   } alert( "unsupported feature, please upgrade your browser" );
   return false;
} 

window.onload = evaluate;

// --> 
</script>
</head>
<body>
<form id="quickbooking" name="quickbooking" action="#">
<div>
<textarea id="phrase" name="phrase" cols="50" rows="10"> Creating a successful Web page requires a good deal from both sides of your brain. The logical side, which helps you write computer programs, and artistic side, which helps you compose a tasteful, inviting document. That's why it's important to have several people test and critique your Web efforts, because few of us can lay full claim to both sides of our brain.
</textarea>
</div>
</form>
<hr>
</body>
</html>

essential I appreciate your hard work, but in this case you just provided lazy student with full solution of his assignment and the person neither learn anything and neither said thank you for your work.
In the future if you similar request encourage person to try it on his/her own and just give them small partions rather then whole solution

Hi peter,

I'll take it from the heart and won't do it next time...

Good day and God bless...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.