Changes

Jump to: navigation, search

Console Class - OOP344 20121

4,828 bytes added, 15:00, 23 January 2017
Help Needed
{{OOP344 Index | 2011320121}}Under Construction!!=Release=* 0.1=Notes=*Using Linux: please use putty only and set the keyboard to *: Backspace = Ctrl-?*: Home and End = Standard*: Function keys and keypad = Linux*: And then:*: Connection > Data > Terminal-type string = linux (This step must be done when first connecting through putty!)* [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=
*Wed, Feb 1st, 23:59
 
 
==Help Needed==
*<font color=green size=3>'''How to submit?''' </font>
----
 
*[http://777sblog.blogspot.com/2012/01/problem-with-cio-tester-45.html <s>I have a problem with cio tester (4.5)</s>]
 
----
 
*[http://yudongxu.blogspot.com/2012/01/problem-with-test-417.html I have a problem with tester 4.17]
**I have answered your question on my [http://777sblog.blogspot.com/2012/02/dons-answer-to-his-question-about-test.html blog] since yours is all in Chinese (I think..) I didn't know what button to press...
 
----
 
*Guys, where is the link to the right tester ? When I run that one from SVN - it shows me - cio_test.cpp(700): error C2065: 'CIO_TABSIZE' : undeclared identifier . Does somebody know what is the problem ?
**Did you add the #define CIO_TABSIZE 4 to the console.h header file?
** Yes you have to add this, you can also add it to bconsol.h and fardad hasn't yet updated the tester for submission... --Sezar 6:49pm Feb 01 2012
 
----
 
*Is anyone having the issue where after Test 10, the general test, once it's over and the console asks "Did everything work correctly?", no matter what key you hit, it simply crashes? I have never seen any message saying I've passed all tests or even to keep trying. I pass all tests but the final question, doesn't seem to take my answer. It just displays a 30 near the top area. To recreate what I'm saying, try pressing any other key other than "Y" when you're asked a question. That action is exactly what I'm getting. -- adsantokhi 6:58PM Feb 01.
** please update the cio_test (v0.92) and the final one still not there yet... we have to wait for fardad to update the test for submission!! -- Sezar 7:28 01 Feb 2012
**I'm using v0.92. Still getting this problem. --adsantokhi 7:46PM Feb 01.
**well 30 is the last screen! so you are done all you have to do is just wait for the submission test thats what it says at the end of the test (screen 30).. -- sezar 7:57PM
 
----
 
*is anyone else having problems compiling on matrix? something about "cio_test.cpp:792: warning: deprecated conversion from string constant to 'char" and a billion similar errors on different lines? --apetrus 10:30PM Feb 01
** Now it's telling me something about "The row and column of the terminal must be maximum of 30 by 100". Has anyone experienced this problem? Works fine on visual studio -- apetrus 11:35PM Feb 01
***You have to change the buffer size to be a width of 100 and height of 30. Are you sure this is matrix and not on your local pc binary created by borland? Right click on the top of the window (window header) and select properties. From there go to the layout tab and change the "Screen Buffer Size" accordingly. --btulchinsky 23:41 Feb 01
 
----
 
*Can anyone help me out? I can't figure out 4.24: It stops when I press 'a'. I'm not sure what's the problem. It's probably has to do with IsTextEditor, but I'm still not sure what exactly the problem is. --dkavalchyk2 09:30AM-Feb-02
 
----
*Final successful submission should be this..... [http://codingstar.blogspot.com/2012/02/final-screenshot-of-assignment-1.html Screenshot]--[[User:Tvirutthasalam|Tvirutthasalam]] 10:20, 6 February 2012 (EST)
 
----
*is anyone having problems with the output on matrix. When i do a.out i get stuck on the test 4.4 where i hit the insert button and the test ends. But in Visual studio it works fine. Any help? --smahmed9 4:03PM
**my mistake. forgot cannot use ssh. Used putty and done. --smahmed9 05:18PM
 
=Console Line Editing Facility =
As your first assignment, you are to upgrade the basic console input output class (BConsole) to include line-display and line-editing facilities and use of "<<" and ">>" operators for character I/O and string output.
Your submission consists of class called Console that is to be inherited from BConsole in a namespace called '''cio'''. Your application module is fully portable, 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 cio namespace (short for console input output).
Your upgrade in this assignment consists of creating a class called Console, inherited from BConsole, implimented 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:
You may assume that it is the calling program's responsibility to ensure that the string array is large enough to handle maxStrLength characters and that the starting screen position provides enough room (on the screen) for the field, etc.
 
This shows the edit method function in a diagram below:
[[File:Editmethod.jpg|400px|thumb|center|Edit Method Function Diagram]]
 
A slightly easier to read version of the above image:
[[File:classNoteJan23.jpg|400px|thumb|center|Edit Method Function Diagram]]
====Step two====
=====IsTextEditor=====
If '''IsTextEditor''' is true and the value of '''*strOffset''' is changed at any time, then terminate the edit function immediately and return '''0''';
======TAB key======
If '''IsTextEditor''' is true and TAB key is hit, then instead of terminating the function, ''CIO_TABSIZE'' spaces are inserted into ''str''.
 
=====ReadOnly=====
If '''ReadOnly''' is true, then edit function works exactly like before, except that any modification to the data (the content of the '''str''' string) will be ignored.   and ReadOnly
===Overloading "<<" and ">>" operators===
For submission purposes, your solution must compile, link, and run without errors in each environment.
When your program passed all the tests, then compile your code with your professors version of cio_test on matrix (i.e cio_test.o) and run it.
 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 cio_test.o from "~fardad.soleimanloo" and then compile your code with your professors version of cio_test (i.e cio_test.o) and run it. If all the tests are passes passed successfully, an email will be sent to your professor automatically with your source code (console.h and your markconsole.cpp). to copy the cio_test.o do the following.<br />From the directory containing all source files: $cp ~fardad.soleimanloo/cio_test.o .to compile the code: $g++ bconsole.cpp console.cpp cio_test.o -lncursesThis should not generate any warnings.<br />To run the test (with automatic submission) $a.out
9
edits

Navigation menu