We read your photo as:
Load AutoCAD Create the roof plan below using rectangle and line command. Write a QBasic program to enter names, Date of Birth, Place of Birth, State of Origin, Sex, Age You are to print out the hard copy of your source code.
ScanSolve AI Answer
Step-by-step solution
3 stepsPart 1: AutoCAD
a) Load AutoCAD.
This step involves launching the AutoCAD software on your computer.
b) Create the roof plan below using rectangle and line command.
Calculate the coordinates of the internal points.
The outer rectangle has a width of and a height of . Let's assume the bottom-left corner of the rectangle is at coordinates .
The central horizontal line segment of the roof plan is formed by the intersection of the diagonal lines. Due to the symmetry of the diagram, this central line will be at half the height of the rectangle, so .
Let the left endpoint of this central line be and the right endpoint be .
The diagonal line from the bottom-left corner to makes an angle of with the bottom edge (x-axis).
The slope of this line is .
The equation of this line is .
Since lies on this line and :Numerically, .
So, the left internal point is .
By symmetry, the right internal point will have an x-coordinate :Numerically, .
So, the right internal point is .Draw the outer rectangle.
Use the
RECTANGcommand to draw the main outline.
RECTANG
Specify first corner point:0,0
Specify other corner point:12,5Draw the internal lines.
Use the
LINEcommand to draw the four diagonal lines and the central horizontal line.- Draw the bottom-left diagonal:
LINESpecify first point:0,0Specify next point:1.443,2.5 - Draw the bottom-right diagonal:
LINESpecify first point:12,0Specify next point:10.557,2.5 - Draw the top-left diagonal:
LINESpecify first point:0,5Specify next point:1.443,2.5 - Draw the top-right diagonal:
LINESpecify first point:12,5Specify next point:10.557,2.5 - Draw the central horizontal line:
LINESpecify first point:1.443,2.5Specify next point:10.557,2.5
Part 2: QBasic Program
a) Write a QBasic program to enter names, Date of Birth, Place of Birth, State of Origin, Sex, Age.
CLS ' Clears the screen ' Declare variables DIM Name AS STRING DIM DateOfBirth AS STRING DIM PlaceOfBirth AS STRING DIM StateOfOrigin AS STRING DIM Sex AS STRING DIM Age AS INTEGER ' Input data from the user INPUT "Enter Name: ", Name INPUT "Enter Date of Birth (DD/MM/YYYY): ", DateOfBirth INPUT "Enter Place of Birth: ", PlaceOfBirth INPUT "Enter State of Origin: ", StateOfOrigin INPUT "Enter Sex (M/F): ", Sex INPUT "Enter Age: ", Age ' Display the entered information (optional, but good practice) PRINT PRINT "--- Entered Information ---" PRINT "Name: "; Name PRINT "Date of Birth: "; DateOfBirth PRINT "Place of Birth: "; PlaceOfBirth PRINT "State of Origin: "; StateOfOrigin PRINT "Sex: "; Sex PRINT "Age: "; Age END ' Ends the programb) You are to print out the hard copy of your source code.
This means you should print the QBasic program code (the text shown above) onto paper. In QBasic, you would typically save the program file and then use a print command from the QBasic editor or operating system to get a physical copy.- Draw the bottom-left diagonal:
Still stuck on this one?
Ask a follow-up, and the answer starts from this question.