Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
See more:
Translates text table files into HTML table files

Text Table File Format
  title: title_of_the_table;
  heading: heading_1, heading_2, ..., heading_n;
  row: value_1, value_2, ..., value_n;
  row: value_1, value_2, ..., value_n;
  ... ... ...
  border: (yes | no); // default: no
  csum: (yes | no); // default: no
  rsum: (yes | no); // default: no
  ... // another table

Each table begins with “[“ and ends with “]”
•Each statement begins with a specific keyword and ends with “;”
•Statements have no order, i.e., they can be intermixed
•“row” statement is essential (at lease 1 required) but others are optional
•Keywords are not case sensitive
•A text file may contain unlimited number of tables
•A table can embed another table within a row (refer to the next slide)

text table code

title: Example table A;
heading: heading_1, heading_2, heading_3;
row: value_11, value_21, value_31;
row: value_12, value_22, value_32;

translate to html table(output)

<caption>Example table A</caption>

if text table code has a ' border:yes '

output table should have a border

Basic Requirements
•Must conform basic principles of OOP
–Encapsulation, inheritance, polymorphism, overloading, …
•HTML table elements must be implemented as a class and must form a inheritance hierarchy
–Make the root class “Element” that has common data and methods
•E.g., data member “children”, “value”, …
•E.g., polymorphic method “serialize” that calls “serialize” of child objects
–Make each table element class by inheriting from class “Element”
•E.g., class “Table”, “Caption”, “Tr”, “Th”, “Td”, …
–Handle all expected exceptions
–Write comments for each class, method, object, function, and variable in detail
Updated 13-Dec-11 21:43pm
Albert Holguin 14-Dec-11 0:02am    
What's your question? You don't expect us to do that for you do you?
Sergey Alexandrovich Kryukov 14-Dec-11 0:05am    
And why, why..?
Balakrishnan Dhinakaran 14-Dec-11 0:06am    
Do your task search in google for solutions again if you have some doubts you can ask here but don't give your task to others .. 14-Dec-11 1:11am    
No homeworks. I didn't do my home works, why you think we should do yours?
Nagy Vilmos 14-Dec-11 3:43am    
Formatted because I care.

1 solution

If you are going to post your homework, at least try to make it look like you have attempted to do something yourself!

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, or learn the Magic Words: "Do you want fries with that?"
Share this answer
Prashant Srivastava LKO 14-Dec-11 7:33am    
Nice answer sir

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900