$30
CS 159 – HW #01
10 Points Possible
Problem: Given the mass of an airplane, the amount of forward force produced by its propellers, and the mass of the
glider it is towing, calculate the resulting tension on the cable connecting the two aircraft and the acceleration of the
glider. Vertical forces and air resistance are not considered.
• All input and output will be positive floating-point (double) values.
• Your program must accept input and produce output that matches exactly to the given executions.
Example Execution #1:
Enter mass of airplane (kg) -> 15000
Enter mass of glider (kg) -> 5000
Enter force produced by propellers (N) -> 75000
Resulting tension: 18750.00 Newtons
Acceleration of glider: 3.75 m/s^2
Example Execution #2:
Enter mass of airplane (kg) -> 10000
Enter mass of glider (kg) -> 5000
Enter force produced by propellers (N) -> 75000
Resulting tension: 25000.00 Newtons
Acceleration of glider: 5.00 m/s^2
Example Execution #3:
Enter mass of airplane (kg) -> 15000
Enter mass of glider (kg) -> 3750
Enter force produced by propellers (N) -> 75000
Resulting tension: 15000.00 Newtons
Acceleration of glider: 4.00 m/s^2
Example Execution #4:
Enter mass of airplane (kg) -> 15000
Enter mass of glider (kg) -> 5000
Enter force produced by propellers (N) -> 85000
Resulting tension: 21250.00 Newtons
Acceleration of glider: 4.25 m/s^2
Example Execution #5:
Enter mass of airplane (kg) -> 12250.25
Enter mass of glider (kg) -> 3125.75
Enter force produced by propellers (N) -> 70575.55
Resulting tension: 14347.13 Newtons
Acceleration of glider: 4.59 m/s^2
All course programming and documentation standards are in effect for this and each
assignment this semester. Please review this document!
Academic Integrity Reminder:
• Please review the policies of the course as they relate to academic integrity. The assignment you submit should be
your own original work. You are to be consulting only course staff regarding your specific algorithm for
assistance. Collaboration is not permitted on individual homework assignments.
Additional Requirements:
1. Add the homework assignment header file to the top of your program. A description of your program will need to
be included in the assignment header. This particular header can be added to your file by entering hhw while in
command mode in vi.
2. 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.
3. Course standards prohibit the use of programming concepts beyond the material found in the first three chapters
of the book, notes, and lectures to be acceptable for use.
4. A program MUST compile to be considered for partial credit. The submission script will reject the submission of
any file that does not successfully compile on the guru server. The name of the source code file you attempt to
submit must be hw01.c, no variation is permitted.
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.
• Notice that several programs (see program 2-9 on pages 74-75) in the programming text use a single line
comment to indicate the start of the local declaration and executable statement sections of the main function.
◦ At no point during the semester should these two sections ever overlap.
• Select meaningful identifiers (names) for all variables in your program.
• Do not single (or double) space the entire program, use blank lines when appropriate.
• There is no need to include example output with your submission.
Auto-Grade Tool
• We have implemented what is being referred to as the auto-grade tool. At the time of a successful assignment
submission you may receive some feedback on your program in regards to course programming and
documentation standards. This feedback may include a potential deduction that you will receive once your
assignment is reviewed by your grader.
• It is expected that graders verify those notes identified by this tool to ensure that they are indeed applicable and
reasonable to the submission. Graders may make additional deductions for those standards not identified by the
new tool.
• We hope that this feedback helps with the enforcement of course standards, consistency in grading across
sections, and to encourage students to revise their work when problems are identified before the assignment
deadline passes. It is possible to resubmit an assignment for grading up to the advertised deadline. Only the final
successful submission is retained and evaluated.
When you submit... only the final successful submission is kept for grading. All other submissions are over-written and
cannot be recovered. You may make multiple submissions but only the last attempt is retained and graded.
• Verify in the confirmation e-mail sent to you by the course that you have submitted the correct file (must be
named hw01.c), to the correct assignment (hw01), and to the correct section.
• Leave time prior to the due date to seek assistance should you experience difficulties completing or submitting
this assignment. All attempts to submit via a method other than through the guru server as set up in the Account
Configuration Activity will be denied consideration.
Assignment deadlines... are firm and the electronic submission will disable promptly as advertised. We can only grade
what you submit as expected prior to the assignment deadline.