Class. Container class.

Hi,
need your help, I have a task and I dont understand some moments.
Here is my task:
Class container which is an abstraction of text and consists of line objects and methods for addition of line to the text, deletion the line from the text, clear the text, get the length of the longest line, transliterate text from Cyrillic to Latin letters, print the text
My questions:
1) What is container class?
2) Abstraction of text?
3) Line objects?
Thanks.
closed account (3qX21hU5)
1) Containers are vectors, lists, deques, arrays, or even strings can be thought of as like a container. So you are creating a class to hold stuff.

2) Meaning it is meant to be used on text, like "abcdefg" or "Hello how are you". At least that is what I got from it.

3) Line objects I'm assuming means lines in a sentence.

Line 1: "Hello how are you doing today"

Line 2: "This is a line of text"

ect.

It seems to me that this assignment is to make a class that deals with lines of text and can manipulate them lines of text in different ways, like delete some of the text in a line, delete a whole line, add text to the line of text, ect.

I could be totally off because to be honest the way they phrase it kind of confuses me to.

Your best bet would be to double check with your professor to make sure you understand exactly what he wants you do to do. He can explain it a lot better then we would be able to.
Last edited on
victor72 wrote:
Class container which is an abstraction of text and consists of line objects and methods for addition of line to the text, deletion the line from the text, clear the text, get the length of the longest line, transliterate text from Cyrillic to Latin letters, print the text


- That assignment prompt is highly unclear in my opinion.
Check with your professor but it sounds like your tasked to write an abstraction for something like an in-memory text file.

A collection of 'line' objects, each of which probably hold (or are) a string, etc..
Topic archived. No new replies allowed.