Challenge: Documents
Description: Create a class in Python 3 named Document that has specified attributes and methods for holding the information for a document and write a program to test the class.
Purpose: The purpose of this challenge is to provide experience creating a class and working with OO concepts in Python 3.
Requirements:
Write a class in Python 3 named Document that has the following attributes and methods and is saved in the file Document.py.
Attributes
__title is a hidden attribute used to hold the document's title (which is a string).
__body is a hidden attribute used to hold the text of the document (which is a string).
__author is a hidden attribute used to indicate the document's author (which is a string).
Methods
__init__ is to define the three attributes above and assign their default values.
get_title should return the value of the __title field.
get_body should return the value of the __body field.
get_author should return the value of the __author field.
Document Generator Program
Once you have created the Document class, create another Python file called documentGenerator.py. This program is to use Document.py as a module.
In documentGenerator.py, prompt the user to enter the title, body, and author for a document. Create a new Documentobject instance to store this data. Then, ask the user if they would like to repeat the process. They should be able to create as many Document object instances as they would like.
After the user is done creating documents, the program is to use the object’s accessor methods (get_title, get_body, and get_author) to retrieve the title, body, and author of each document. This information is to be displayed in a nicely formatted way.
THANK YOU! (:
In: Computer Science
Answer each one, with (brief) justification. Throughout, V denotes a vector space, and bold-face letters like u, v, etc denote vectors in V.
A1. Suppose there are three linearly independent vectors in V. Is V necessarily finite-dimensional?
A2. Suppose there are three vectors in V that span V. Is V necessarily finite-dimensional?
A3. What is the dimension of the vector space of all polynomials of degree 4 or less?
A4. Can an infinite-dimensional vector space contain a finite-dimensional subspace?
A5, In a finite-dimensional vector space, is every spanning set necessarily finite?
A6. Can R3 contain a four-dimensional subspace?
In: Advanced Math
If you are to conduct an experiment that will illustrate the third law of motion, how will your experiment setup be?
In: Physics
What's the objective of precursor preparation experiment?
And why the color of precursors changes during the experiment?
In: Other
Select a child who falls within one of the stages of development outlined by Piaget. Once you have decided on the age range you will use, choose the appropriate Piagetian experiment to determine the child's level of cognitive development. Conduct the experiment: Findings: Tell us the age and gender of the child Which experiment you used Where the experiment took place The procedures you followed What the child said and did Tell us your conclusions.
In: Psychology
“Food preferences developed in infancy set the stage for lifelong food habits”. The author suggests that the feeding relationship can help to develop trust and security in an infant. What do you think about this topic? How might parental attitudes toward food influence very young children?
In: Nursing
“Food preferences developed in infancy set the stage for lifelong food habits”. The author suggests that the feeding relationship can help to develop trust and security in an infant. What do you think about this topic? How might parental attitudes toward food influence very young children?
In: Nursing
In: Accounting
In: Accounting
Good to know who they are and what they do! , respond to one of the questions posed by the author. can you please write the question you like to answer? thanks
https://iaonline.theiia.org/blogs/chambers/2018/Pages/When-Good-Accountants-Go-Bad-More-Questions-Are-Raised-Than-Answered.aspx
In: Accounting