CSE 241 Homework Assignment 1 solved

$35.00

Category: You will receive a download link of the .ZIP file upon Payment

Description

5/5 - (1 vote)

Description • This is an individual assignment. Please do not collaborate. • If you think that this document does not clearly describe the assignment, ask questions before its too late. You won’t be given a chance to correct any mistakes. • Write a C++ code which does the following: – Captures an integer from command line. Let this integer be L. – Prints the fibonacci pyramid which has L+1 number of rows. – Prints the largest number in the pyramid. – Prints the heart of the pyramid. Example • User enters the following number: 9 • Your program prints the following: 1 1 1 2 1 2 3 2 2 3 5 3 4 3 5 8 5 6 6 5 8 13 8 10 9 10 8 13 21 13 16 15 15 16 13 21 34 21 26 24 25 24 26 21 34 55 34 42 39 40 40 39 42 34 55 Biggest number: 55 Heart of the pyramid: 6 6 Remarks • Do not use any elements which is not covered in class. • Do not submit your code without testing it with several different scenarios. • Write comments in your code. Turn in: • Source code of a complete C++ program. Name of the file should be in this format: _.cpp. • Example: gokhan_kaya_000000.cpp. Please do not use any Turkish special characters. • You don’t need to use an IDE for this assignment. Your code will be compiled and run in a command window. • Your code will be compiled and tested on a Linux machine(Ubuntu). GCC will be used. • Make sure you don’t get compile errors when you issue this command : g++ _.cpp. 1 • A script will be used in order to check the correctness of your results. So, be careful not to violate the expected output format. • Provide comments unless you are not interested in partial credit. (If I cannot easily understand your design, you may loose points.) • You may not get full credit if your implementation contradicts with the statements in this document. Late Submission • (0,24] hours: -20% • (24,48] hours: -40% • (48,72] hours: -60% • (72,-) hours: -100% Grading (Tentative) • Max Grade : 100. • Multiple tests(at least 5) will be performed. All of the followings are possible deductions from Max Grade. • #define HARD_CODED_VALUES -10. • No submission: -100. (be consistent in doing this and your overall grade will converge to N/A) (To be specific: if you miss 3 assignments you’ll get N/A) • Compile errors: -100. • Irrelevant code: -100. • Major parts are missing: -100. • Unnecessarily long code: -30. • Using language elements and libraries which are not allowed: -100. • Not caring about the structure and efficiency: -30. (avoid using hard-coded values, avoid hard-to-follow expressions, avoid code repetition, avoid unnecessary loops). • Significant number of compiler warnings: -10. • Not commented enough: -5. (Comments are in English). • Source code encoding is not UTF-8 and characters are not properly displayed: -5. (You can use ‘Visual Studio Code’, ‘Sublime Text’, ‘Atom’ etc. . . Check the character encoding of your text editor and set it to UTF-8). • Missing or wrong output values: Fails the test. • Output format is wrong: -30. • Infinite loop: Fails the test. • Segmentation fault: Fails the test. • Fails 5 or more random tests: -100. • Fails the test: deduction up to 20. • Prints anything extra: -30. • Unwanted chars and spaces in output.txt: -30. • Submission includes files other than the expected: -10. • Submission does not follow the file naming convention: -10. • Sharing or inheriting code: -200. 2