Open main menu

CDOT Wiki β

Changes

Project R0.1 20132- OOP344

1,879 bytes removed, 08:31, 24 September 2013
no edit summary
{{OOP344 Index | 2013120133}}
=Release=
*: And then:
*: Connection > Data > Terminal-type string = linux (This step must be done when first connecting through putty!)
<!--*:: Or if you have already connected, type in (export TERM="linux") without brackets** If you're still having problems do all of that AND (export TERM="linux") and it will allow you to use END and HOME, though the F keys still won't work.-->
* [https://cs.senecac.on.ca/~chris.szalwinski/resources/borland.html Guide for Using Borland 5.5]
*: Note that to change the cmd.exe window size, right click on the top bar -> Properties -> Layout Tab
=Due Dates=
Monday June 17th.
=Help=
==Help Needed==* <strike>Bug(?): The insert mode in our assignment works as it is supposed to but fails Please blog about your problems and notes and add the test when running the test programlink with a proper title below. Has anyone else encountered this problem, or is this an error on my side?<br /strikeI had the same problem. Try Reply to replace the original code '''Console::_insertMode''' by just '''insertMode'''. It works for me. Otherwise it is local I guess. So it works within your application but does not react to parameter passed to the function. Thank you. I actually solved it by making insertMode=Console::_insertMode. * Just noticed that the return string for the 4-6 test is wrong. It checks others blogs to see if you've inserted 'ab' into the string, help and not 'abc' like update the dialog box asks for. If you insert only 'ab' the test passes as it should. * In test 4.9 (END button), the test gives the string which stays in the middle of the field, is that OK?! I see that kind of a weird situation. In that case it fails the END button test, because values for curPosition & strOffset are not right. Ideas? You want to set the curPosition=size-*strOffset. This will mean that it scrolls down the string blog link to the end if the length of the string is longer than the field, but only move to the end of the string if it isn't, which allows for having the string stay in the middle of the field as in the test. When indicate you do this, though, don't forget that you need replied to make sure that, when the curPosition goes outside the field, the curPosition and offset are changed accordingly. * Anyone know where/how to submit when it's complete? If I'm not mistaking the test program should submit it in the end of the testing automaticallythemNo, once you reach the end it says "Wait for the final tester to submit the assignment". Unless there's another program around that I'm not aware of. 
==Blog Posts==
==Specifications==
Your submission consists of a class called Console that is to be inherited from BConsole in a namespace called '''cuicio'''. Your application module is fully portable across Borland C++5.5 on windows, Linux GNU C++, Viusual C++ on Windows and Mac C++ platforms which accepts console input, and provides console output through the set of facilities available in your Console module.
The name of the library object to be created is console. The header file for the original version of this module is console.h and the implementation file for the original version is console.cpp. All of the identifiers for the library module and all upgrades to the module are defined in the cui cio namespace (short for console input output).
Your upgrade in this assignment consists of creating a class called Console, inherited from BConsole, implemented in two files; console.h and console.cpp:
In addition to all public methods of BConsole, Console must have the following two public methods and overload "<<" and ">>" operators.
===external links===
* instantiate Console, in an object called "console" in cui cio namespace and create an external linkage to in console.h
===strdsp() method===
void display(const char* str, int row, int col, int fieldLen=0, int curpos = -1);
Your function positions the cursor after the last character displayed if curpos is less than zero otherwise it positions the cursor at "curpos" location relative to "col". The results are undefined if the starting position of the string is not within the dimensions of the screen.
===lineeditedit() method===
<big><pre>
int lineeditedit(char *str, int row, int col, int fieldLength, int maxStrLength,
int* strOffset=_stroff, int* curPosition=_curpos,
bool InTextEditor = false, bool ReadOnly = false, bool& insertMode=_insertMode );
====Step two====
''First run your program with cui_testcio_test.cpp and make sure it passes all the tests up to and including "4.16". If all tests are passed continue with step two:
=====InTextEditor=====
=Submission=
==Common Submission mistakes==
<!--* Submitting the assignment with old version of cui_textcio_text.o
*: ''Make sure you copy the latest version (currently 0.94.1) from my account : $cp ~fardad.soleimanloo/cio_test.o
* Using tab character''
<!--To see how tester runs, you can run on Matrix (only use putty with the setting stated at [[#Notes|Notes]]) run:
<big><pre>
$ ~fardad.soleimanloo/cui_testcio_test
</pre></big> -->
Local PC: Borland 5.5
bcc32 bconsole.cpp console.cpp cui_testcoi_test.cpp
Local Mac: (use -lcurses to link curses library)
c++ bconsole.cpp console.cpp cui_testcoi_test.cpp -lcurses -Wno-write-strings
matrix: GNU (use -lncurses to link ncurses library)
g++ bconsole.cpp console.cpp cui_testcio_test.cpp -lncurses -Wno-write-strings
Local PC: Visual Studio.net
=== Tester Program ===
<!--*Tester program is at git://github.com/Seneca-OOP344/20132notes.git (Notes repository) in '''TesterPrograms''' directory.
*repo path:<br/>
*:[https://github.com/Seneca-OOP344/20132notes.git 20132notes]/TesterPrograms/cui_testcio_test.cpp-->
==How to submit==
TBA
<!--
For submission , your solution must compile, link, and run without errors in each environment.
First pull the changes of the two files bconsole.cpp and bconsole.h to version 1.03 (jun 1, 2013) from the conui directory in notes repository of your section.
Test your program with cio_test.cpp from the same conui directory stated above. When your program passed all the tests; on matrix, create a directory and copy all the source files (console.cpp, console.h, bconsole.cpp, bconsole.h) into it. Then copy cui_testcio_test.o from "~fardad.soleimanloo" and then compile your code with your Fardad's version of cui_test cio_test (i.e cui_testcio_test.o) and run it. If all the tests are passed successfully, an email will be sent to your Fardad automatically with your source code (console.h and console.cpp) attached to it.
to copy the cui_testcio_test.o execute the following on matrix.<br />
From the directory containing all source files:
$cp ~fardad.soleimanloo/cui_testcio_test.o .
to compile the code:
$ g++ bconsole.cpp console.cpp cui_testcio_test.o -lncurses -Wno-write-strings<br />
This should not generate any warnings.<br />
To run the test (with automatic submission)
Example:
$ a.out Team-X Fardad Soleimanloo, Joseph Hughes, Homer Simpson, Apu Nahasapeemapetilon <ENTER>
--><!--
== Tasks Distribution Suggestion==
=== Team of 3 ===
*# Left
*# Insert
 
 
<!--
Tab: 23
Function keys: 1
Overstrike: 15
operator>> int& 3
operator<< char 3
operator<< char* 4
Insert: 1
 
 
Intial Corrections: 18
Home: 4
End: 7
Escape: 5
Right: 10
Left: 4
Enter: 1
 
BackSpace: 23
Del: 3
Insert Mode: 14
IsTextEditor and ReadOnly 10
-->