SlideShare a Scribd company logo
1 of 10
Overview
For this assignment you will be building two main components.
A menu system and several drawing routines.
The menu system will operate on a whitelist principle and
prompt the user for the type of drawing they want and its size.
A
whitelist
is a list of accepted inputs with anything not on the list
rejected.
The drawings will all be ASCII shapes of user specified size.
Menu System
The menu should prompt the user for a command and if it is not
a valid command, respond it is invalid and prompt again. The
commands it needs to respond include:
help - This will print a list of all accepted inputs and re-prompt
the user.
quit - This will terminate the program.
square - This will initiate the square drawing.
box - This will initiate a box drawing.
diagonaldown - This will initiate a diagonal down line.
diagonalup - This will initiate a diagonal up line.
checkerboard - This will initiate a checkerboard pattern.
The matching for the commands should be case insensitive. That
is "Help", "help", and "hElP" will all trigger the help command.
Drawings
There are several drawings that your program needs to support
Square
When a square is drawn it will first prompt the user for a size.
Valid sizes are 1 through 15 inclusive. An example square of
size 5 is
*****
*****
*****
*****
*****
Box
When a box is drawn it will first prompt the user for a size.
Valid sizes are 3 through 15 inclusive. An example box of size
5 is
*****
* *
* *
* *
*****
Diagonal Down
When a diagonal down line is drawn, it will first prompt the
user for a size. Valid sizes are 3 through 15 inclusive. An
example line of size 5 is
*
*
*
*
*
Diagonal Up
When a diagonal up line is drawn, it will first prompt the user
for a size. Valid sizes are 3 through 15 inclusive. An example
line of size 5 is
*
*
*
*
*
Checkerboard
When a checkerboard drawn, it will first prompt the user for a
size. Valid sizes are 5 through 15 inclusive. An example line of
size 10 is
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
* * * * *
Tips
Write your program iteratively. You shouldn't ever write more
than a few lines of code without compiling and testing it.
Start with small pieces. It isn't reasonable to sit down and write
the whole program from beginning to end. The pieces you build
should ultimately fit together to build the whole program.
It is easiest to draw the various shapes using nested for loops.
One way to build the program is as follows:
Write a function that accepts user input and validates it against
the list of command. Start with it being case sensitive and then
add case insensitivity.
Write the functionality to print out a help message, quit, and re-
prompting the user on invalid input.
Start with one of the drawings, say a square. Create a function
to draw a square. Initially make it draw a fixed size, then allow
for it to draw an arbitrary size.
Write a function to prompt the user for a size within a specified
range. This function should validate the input is in the specified
range and re-prompt if it is outside. Make sure to write this
function so that it can be used for multiple drawings which may
have different size constraints.
Integrate your size prompt function to fully draw your first
chosen shape.
At this point your program should have close to full
functionality, with the only thing missing being other shapes.
Add the remaining shapes to the program using the
infrastructure you have already built.
Example Output
User input is in bold
Please enter a command:
bad
Invalid command
Please enter a command:
hElP
Acceptable commands: help, quit, square, box, diagonaldown,
diaonalup, checkerboard
Please enter a command:
square
Please enter a size between 1 and 15:
-1
The value -1 is not in a valid range.
Please enter a size between 1 and 15:
16
The value 16 is not in a valid range.
Please enter a size between 1 and 15:
5
*****
*****
*****
*****
*****
Please enter a command:
box
Please enter a size between 3 and 15:
2
The value 2 is not in a valid range.
Please enter a size between 3 and 15:
5
*****
* *
* *
* *
*****
Please enter a command:
diagonaldown
Please enter a size between 3 and 15:
7
*
*
*
*
*
*
*
Please enter a command:
diagonalup
Please enter a size between 3 and 15:
7
*
*
*
*
*
*
*
Please enter a command:
checkerboard
Please enter a size between 5 and 15:
13
* * * * * * *
* * * * * *
* * * * * * *
* * * * * *
* * * * * * *
* * * * * *
* * * * * * *
* * * * * *
* * * * * * *
* * * * * *
* * * * * * *
* * * * * *
* * * * * * *
Please enter a command:
quit
Previous
Next

More Related Content

Similar to OverviewFor this assignment you will be building two main co.docx

Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
C programming session 07
C programming session 07C programming session 07
C programming session 07Dushmanta Nath
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)Puneet narula
 
Please help. C++ The program is an interactive program th.pdf
Please help. C++ The program is an interactive program th.pdfPlease help. C++ The program is an interactive program th.pdf
Please help. C++ The program is an interactive program th.pdffsenterprises
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 
Intro to programing with java-lecture 3
Intro to programing with java-lecture 3Intro to programing with java-lecture 3
Intro to programing with java-lecture 3Mohamed Essam
 
PCB Artist Desinging Software Report
PCB Artist Desinging Software ReportPCB Artist Desinging Software Report
PCB Artist Desinging Software ReportEr. Ashish Pandey
 
Lesson plan 2 matt 3
Lesson plan 2 matt 3Lesson plan 2 matt 3
Lesson plan 2 matt 3Max Friel
 

Similar to OverviewFor this assignment you will be building two main co.docx (11)

Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
C programming session 07
C programming session 07C programming session 07
C programming session 07
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
 
P3
P3P3
P3
 
Please help. C++ The program is an interactive program th.pdf
Please help. C++ The program is an interactive program th.pdfPlease help. C++ The program is an interactive program th.pdf
Please help. C++ The program is an interactive program th.pdf
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
03b loops
03b   loops03b   loops
03b loops
 
Intro to programing with java-lecture 3
Intro to programing with java-lecture 3Intro to programing with java-lecture 3
Intro to programing with java-lecture 3
 
Flowcharting and Algorithm
Flowcharting and Algorithm Flowcharting and Algorithm
Flowcharting and Algorithm
 
PCB Artist Desinging Software Report
PCB Artist Desinging Software ReportPCB Artist Desinging Software Report
PCB Artist Desinging Software Report
 
Lesson plan 2 matt 3
Lesson plan 2 matt 3Lesson plan 2 matt 3
Lesson plan 2 matt 3
 

More from aman341480

Paracentesis diagnostic procedure ALT Active Learning Template .docx
Paracentesis diagnostic procedure ALT Active Learning Template .docxParacentesis diagnostic procedure ALT Active Learning Template .docx
Paracentesis diagnostic procedure ALT Active Learning Template .docxaman341480
 
Paper to include Name of the Culture,(Italian)Country of Origin.docx
Paper to include Name of the Culture,(Italian)Country of Origin.docxPaper to include Name of the Culture,(Italian)Country of Origin.docx
Paper to include Name of the Culture,(Italian)Country of Origin.docxaman341480
 
Paper on Tone What is Flannery O’Connor really discussing in A.docx
Paper on Tone What is Flannery O’Connor really discussing in A.docxPaper on Tone What is Flannery O’Connor really discussing in A.docx
Paper on Tone What is Flannery O’Connor really discussing in A.docxaman341480
 
PAPERSDecember 2008 Project Management Jou.docx
PAPERSDecember 2008  Project Management Jou.docxPAPERSDecember 2008  Project Management Jou.docx
PAPERSDecember 2008 Project Management Jou.docxaman341480
 
PAPER TOPIC You may choose any biological, chemical or physic.docx
PAPER TOPIC You may choose any biological, chemical or physic.docxPAPER TOPIC You may choose any biological, chemical or physic.docx
PAPER TOPIC You may choose any biological, chemical or physic.docxaman341480
 
Paper Instructions Paper 1 is your first attempt at an argumen.docx
Paper Instructions Paper 1 is your first attempt at an argumen.docxPaper Instructions Paper 1 is your first attempt at an argumen.docx
Paper Instructions Paper 1 is your first attempt at an argumen.docxaman341480
 
Paper to include Name of the Culture,(Italian)Country of Or.docx
Paper to include Name of the Culture,(Italian)Country of Or.docxPaper to include Name of the Culture,(Italian)Country of Or.docx
Paper to include Name of the Culture,(Italian)Country of Or.docxaman341480
 
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docx
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docxPAPER EXPECTATIONSFollow the instructions.Make your ideas .docx
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docxaman341480
 
Paper Title (use style paper title)Note Sub-titles are not.docx
Paper Title (use style paper title)Note Sub-titles are not.docxPaper Title (use style paper title)Note Sub-titles are not.docx
Paper Title (use style paper title)Note Sub-titles are not.docxaman341480
 
Paper requirementsMust be eight to ten pages in length (exclud.docx
Paper requirementsMust be eight to ten pages in length (exclud.docxPaper requirementsMust be eight to ten pages in length (exclud.docx
Paper requirementsMust be eight to ten pages in length (exclud.docxaman341480
 
Paper is due March 15th. Needed it by March 14th for reviewT.docx
Paper is due March 15th. Needed it by March 14th for reviewT.docxPaper is due March 15th. Needed it by March 14th for reviewT.docx
Paper is due March 15th. Needed it by March 14th for reviewT.docxaman341480
 
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docx
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docxPaper deadline[10 pts] Due Saturday 0321 Turn in the followin.docx
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docxaman341480
 
Paper C Topic Selection (Individual) and Research of an existin.docx
Paper C Topic Selection (Individual) and Research of an existin.docxPaper C Topic Selection (Individual) and Research of an existin.docx
Paper C Topic Selection (Individual) and Research of an existin.docxaman341480
 
Paper Ba matrix mapping of a key IT-related organizational (o.docx
Paper Ba matrix mapping of a key IT-related organizational (o.docxPaper Ba matrix mapping of a key IT-related organizational (o.docx
Paper Ba matrix mapping of a key IT-related organizational (o.docxaman341480
 
Paper CriteriaTopic selection—A current governmental policy re.docx
Paper CriteriaTopic selection—A current governmental policy re.docxPaper CriteriaTopic selection—A current governmental policy re.docx
Paper CriteriaTopic selection—A current governmental policy re.docxaman341480
 
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxPaper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxaman341480
 
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docx
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docxPaper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docx
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docxaman341480
 
Page 1 of 2 Summer 2020 AFR 110N Sec. 101, Dr. Gove.docx
Page 1 of 2  Summer 2020 AFR 110N Sec. 101, Dr. Gove.docxPage 1 of 2  Summer 2020 AFR 110N Sec. 101, Dr. Gove.docx
Page 1 of 2 Summer 2020 AFR 110N Sec. 101, Dr. Gove.docxaman341480
 
Page 1 of 4 NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docx
Page 1 of 4    NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docxPage 1 of 4    NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docx
Page 1 of 4 NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docxaman341480
 
Page 2 (BSBMGT516 Facilitate continuous improvementLea.docx
Page  2 (BSBMGT516 Facilitate continuous improvementLea.docxPage  2 (BSBMGT516 Facilitate continuous improvementLea.docx
Page 2 (BSBMGT516 Facilitate continuous improvementLea.docxaman341480
 

More from aman341480 (20)

Paracentesis diagnostic procedure ALT Active Learning Template .docx
Paracentesis diagnostic procedure ALT Active Learning Template .docxParacentesis diagnostic procedure ALT Active Learning Template .docx
Paracentesis diagnostic procedure ALT Active Learning Template .docx
 
Paper to include Name of the Culture,(Italian)Country of Origin.docx
Paper to include Name of the Culture,(Italian)Country of Origin.docxPaper to include Name of the Culture,(Italian)Country of Origin.docx
Paper to include Name of the Culture,(Italian)Country of Origin.docx
 
Paper on Tone What is Flannery O’Connor really discussing in A.docx
Paper on Tone What is Flannery O’Connor really discussing in A.docxPaper on Tone What is Flannery O’Connor really discussing in A.docx
Paper on Tone What is Flannery O’Connor really discussing in A.docx
 
PAPERSDecember 2008 Project Management Jou.docx
PAPERSDecember 2008  Project Management Jou.docxPAPERSDecember 2008  Project Management Jou.docx
PAPERSDecember 2008 Project Management Jou.docx
 
PAPER TOPIC You may choose any biological, chemical or physic.docx
PAPER TOPIC You may choose any biological, chemical or physic.docxPAPER TOPIC You may choose any biological, chemical or physic.docx
PAPER TOPIC You may choose any biological, chemical or physic.docx
 
Paper Instructions Paper 1 is your first attempt at an argumen.docx
Paper Instructions Paper 1 is your first attempt at an argumen.docxPaper Instructions Paper 1 is your first attempt at an argumen.docx
Paper Instructions Paper 1 is your first attempt at an argumen.docx
 
Paper to include Name of the Culture,(Italian)Country of Or.docx
Paper to include Name of the Culture,(Italian)Country of Or.docxPaper to include Name of the Culture,(Italian)Country of Or.docx
Paper to include Name of the Culture,(Italian)Country of Or.docx
 
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docx
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docxPAPER EXPECTATIONSFollow the instructions.Make your ideas .docx
PAPER EXPECTATIONSFollow the instructions.Make your ideas .docx
 
Paper Title (use style paper title)Note Sub-titles are not.docx
Paper Title (use style paper title)Note Sub-titles are not.docxPaper Title (use style paper title)Note Sub-titles are not.docx
Paper Title (use style paper title)Note Sub-titles are not.docx
 
Paper requirementsMust be eight to ten pages in length (exclud.docx
Paper requirementsMust be eight to ten pages in length (exclud.docxPaper requirementsMust be eight to ten pages in length (exclud.docx
Paper requirementsMust be eight to ten pages in length (exclud.docx
 
Paper is due March 15th. Needed it by March 14th for reviewT.docx
Paper is due March 15th. Needed it by March 14th for reviewT.docxPaper is due March 15th. Needed it by March 14th for reviewT.docx
Paper is due March 15th. Needed it by March 14th for reviewT.docx
 
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docx
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docxPaper deadline[10 pts] Due Saturday 0321 Turn in the followin.docx
Paper deadline[10 pts] Due Saturday 0321 Turn in the followin.docx
 
Paper C Topic Selection (Individual) and Research of an existin.docx
Paper C Topic Selection (Individual) and Research of an existin.docxPaper C Topic Selection (Individual) and Research of an existin.docx
Paper C Topic Selection (Individual) and Research of an existin.docx
 
Paper Ba matrix mapping of a key IT-related organizational (o.docx
Paper Ba matrix mapping of a key IT-related organizational (o.docxPaper Ba matrix mapping of a key IT-related organizational (o.docx
Paper Ba matrix mapping of a key IT-related organizational (o.docx
 
Paper CriteriaTopic selection—A current governmental policy re.docx
Paper CriteriaTopic selection—A current governmental policy re.docxPaper CriteriaTopic selection—A current governmental policy re.docx
Paper CriteriaTopic selection—A current governmental policy re.docx
 
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxPaper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
 
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docx
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docxPaper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docx
Paper #4 PromptDue Date April 17Rough Draft (Optional) Due A.docx
 
Page 1 of 2 Summer 2020 AFR 110N Sec. 101, Dr. Gove.docx
Page 1 of 2  Summer 2020 AFR 110N Sec. 101, Dr. Gove.docxPage 1 of 2  Summer 2020 AFR 110N Sec. 101, Dr. Gove.docx
Page 1 of 2 Summer 2020 AFR 110N Sec. 101, Dr. Gove.docx
 
Page 1 of 4 NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docx
Page 1 of 4    NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docxPage 1 of 4    NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docx
Page 1 of 4 NIZWA COLLEGE OF TECHNOLOGY BUSINESS .docx
 
Page 2 (BSBMGT516 Facilitate continuous improvementLea.docx
Page  2 (BSBMGT516 Facilitate continuous improvementLea.docxPage  2 (BSBMGT516 Facilitate continuous improvementLea.docx
Page 2 (BSBMGT516 Facilitate continuous improvementLea.docx
 

Recently uploaded

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 

Recently uploaded (20)

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

OverviewFor this assignment you will be building two main co.docx

  • 1. Overview For this assignment you will be building two main components. A menu system and several drawing routines. The menu system will operate on a whitelist principle and prompt the user for the type of drawing they want and its size. A whitelist is a list of accepted inputs with anything not on the list rejected. The drawings will all be ASCII shapes of user specified size. Menu System The menu should prompt the user for a command and if it is not a valid command, respond it is invalid and prompt again. The commands it needs to respond include: help - This will print a list of all accepted inputs and re-prompt the user. quit - This will terminate the program. square - This will initiate the square drawing. box - This will initiate a box drawing. diagonaldown - This will initiate a diagonal down line. diagonalup - This will initiate a diagonal up line.
  • 2. checkerboard - This will initiate a checkerboard pattern. The matching for the commands should be case insensitive. That is "Help", "help", and "hElP" will all trigger the help command. Drawings There are several drawings that your program needs to support Square When a square is drawn it will first prompt the user for a size. Valid sizes are 1 through 15 inclusive. An example square of size 5 is ***** ***** ***** ***** ***** Box When a box is drawn it will first prompt the user for a size. Valid sizes are 3 through 15 inclusive. An example box of size 5 is ***** * *
  • 3. * * * * ***** Diagonal Down When a diagonal down line is drawn, it will first prompt the user for a size. Valid sizes are 3 through 15 inclusive. An example line of size 5 is * * * * * Diagonal Up When a diagonal up line is drawn, it will first prompt the user for a size. Valid sizes are 3 through 15 inclusive. An example line of size 5 is * * * *
  • 4. * Checkerboard When a checkerboard drawn, it will first prompt the user for a size. Valid sizes are 5 through 15 inclusive. An example line of size 10 is * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Tips Write your program iteratively. You shouldn't ever write more than a few lines of code without compiling and testing it. Start with small pieces. It isn't reasonable to sit down and write
  • 5. the whole program from beginning to end. The pieces you build should ultimately fit together to build the whole program. It is easiest to draw the various shapes using nested for loops. One way to build the program is as follows: Write a function that accepts user input and validates it against the list of command. Start with it being case sensitive and then add case insensitivity. Write the functionality to print out a help message, quit, and re- prompting the user on invalid input. Start with one of the drawings, say a square. Create a function to draw a square. Initially make it draw a fixed size, then allow for it to draw an arbitrary size. Write a function to prompt the user for a size within a specified range. This function should validate the input is in the specified range and re-prompt if it is outside. Make sure to write this function so that it can be used for multiple drawings which may have different size constraints. Integrate your size prompt function to fully draw your first chosen shape. At this point your program should have close to full functionality, with the only thing missing being other shapes. Add the remaining shapes to the program using the infrastructure you have already built.
  • 6. Example Output User input is in bold Please enter a command: bad Invalid command Please enter a command: hElP Acceptable commands: help, quit, square, box, diagonaldown, diaonalup, checkerboard Please enter a command: square Please enter a size between 1 and 15: -1 The value -1 is not in a valid range. Please enter a size between 1 and 15: 16 The value 16 is not in a valid range. Please enter a size between 1 and 15: 5 ***** *****
  • 7. ***** ***** ***** Please enter a command: box Please enter a size between 3 and 15: 2 The value 2 is not in a valid range. Please enter a size between 3 and 15: 5 ***** * * * * * * ***** Please enter a command: diagonaldown Please enter a size between 3 and 15: 7
  • 8. * * * * * * * Please enter a command: diagonalup Please enter a size between 3 and 15: 7 * * * * * *
  • 9. * Please enter a command: checkerboard Please enter a size between 5 and 15: 13 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  • 10. Please enter a command: quit Previous Next