Question: CS 1 5 9 - HW # 0 2 Problem: A residential development begins with homes alternating on half - lot and full - lots.
CS HW #
Problem: A residential development begins with homes alternating on halflot and fulllots. The first address is at
and is a halflot. The next lot is a fulllot with an address of Continuing this alternating series of halflots and full
lots the third home would be at address on a halflot. There is no address
Neighboring homes share a single driveway along the border of the adjacent properties. The first driveway, shared by the
homes at and would enter from North Road while the second driveway, shared by homes at and would
enter from the South Road. A similar alternating direction of entry onto the properties continues through the development.
Given an address and the dimensions of a full lot, determine whether the lot is a halflot H or fulllot F and the road
to which the driveway is connected, either North Road N or South Road S Lastly, display the lot size which is the
area for a fulllot and half of the area for a halflot.
The address given will be no less than Addresses such as are invalid, see the example executions that follow for
a demonstration of how to handle invalid addresses.
Your program must accept input and produce output that matches exactly to the given executions.
Example Execution #:
Enter property address
Enter property length
Enter property width
Property Type: H
Drive Entry: N
Lot Size:
Example Execution #invalid address:
Enter property address
Enter property length
Enter property width
Property Type: I
Drive Entry: I
Lot Size:
Example Execution #:
Enter property address
Enter property width
Property Type: F
Drive Entry: N
Lot Size:
Example Execution #:
Enter property address
Enter property length
Enter property width
Property Type: F
Drive Entry: S
Lot Size:
All course programming and documentation standards are in effect for this and each
assignment this semester. Please review this document!
Additional Requirements:
Each of the example executions provided for your reference represents a single execution of the program.
Your program must accept input and produce output exactly as demonstrated in the example executions, do not
add any "bonus" features not demonstrated in the example executions. Your program will be tested with the data
seen in the example executions and an unknown number of additional tests making use of meaningful data.
The address will always be an integer int not less than
The length and width dimensions of the property may be floatingpoint float data and will be positive.
Course standards prohibit the use of programming concepts beyond the material found in the first three chapters
of the book, notes, and lectures.
Any use of logical operators, relational operators, bool variables, or selection constructs is prohibited and
would violate requirements of this assignment resulting in no credit being awarded for your effort.
All code for this assignment will be placed inside of the main function.
Course Programming and Documentation Standards Reminders:
Indent all code found within the main function exactly two spaces.
Place a single space between all operators and operands.
Comment all variables to the right of each declaration. Declare only one variable per line.
comment to indicate the start of the local declaration and executable statement sections of the main function.
Select meaningful identifiers names for all variables in your program.
Maximize your use of symbolicdefined constants and minimize your use of literal constants in your program.
note: im not sure how to do without selection structures can you help me with this please? so theres a pattern to the lots, and are connected to the north rd is a full lot and is a half lot and is skipped. same pattern for and but they are connected to the south road and is skipped. so the pattern is full half north skip then full half south skip this goes on until lot as seen in the example. use this pattern to create code that outputs the example without using selection structures
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
