Basics Of Conditionals The Program Will Print The Programming Assignment Number 2843793

CS237 SP2018 Assignment #2 100 Points Due: 11/21 11:59pm CS237 Assignment #2 Purpose This assignment is designed to familiarize you with the basics of conditionals. Requirements This assignment consists of five major requirements. 1) Developing a solution to the problem below. 2) Ensuring that it assembles and runs correctly using the tools on edoras. 3) Documenting your solutions correctly. 4) Organizing your handin directory and submissions correctly. Problem 1) First, the program will print the programming assignment number, your name, and your class account, all on one line. Your program is going to determine if an input number is prime. Your program will prompt the user to enter a number of three to five characters in length. Your program will validate that the user has entered a valid base10 number. If the user has not, your program will print an error message “Not a number.” and re-prompt for the input again. Your program will then determine if the input number is prime. If the number is prime, your program should output “The number XXXX is prime.” If the number is not prime, your program should output “The number XXXX is not prime.” If the user enters a number that is not at least three characters long, or longer than five characters you should print the following error message and reprompt for input: “Incorrect input length.” Example 1: Program #2, Student Name, csscXXXX Enter a 3-5 digit number: 3 Incorrect input length. Enter a 3-5 digit number: 12ab Not a number. CS237 SP2018 Assignment #2 100 Points Due: 11/21 11:59pm Enter a 3-5 digit number: 123abvdeasddd Incorrect input length. Enter a 3-5 digit number: 333 The number 333 is not prime. Some things to note: a) Solve the problem in chunks as we have been doing in class. Solve the easy steps first, and the hard steps as you discover how to do them. b) Start with simpler restrictions and solve those problems first. c) Make sure you pursue the io macros provided by Riggins in the reader. There are examples and usages of all of the functions you will need for this project inside. d) You will need to use loops and branches. 2) You must ensure that your assembler can be assembled and run on edoras using the tools ppasm and bsvc. You may develop your solution on any machine you desire, as long as the final solution works on edoras. 3) Your solution must have a complete comment header as is detailed in your template.s file. During runtime, your solution to section 1 must output a correct title string as the first line printed. It should be in this format: Program #1, Student Name, mascXXXX 4) You must place a copy of your solution inside a folder named handin in your home directory. Your file MUST be named prog*.s (where the * is the assignment number, so prog1.s for assignment 1) and must not be modified after the turn in time. The modified timestamp for the file prog*.s in your handin folder will be used as the submission time. If it is after the due date, it will be counted as late. DO NOT turn in any compiled files. 5) You must bring in a hardcopy of the attached rubric to class on the day the assignment is due. I will not grade the assignment without a hardcopy of the rubric. If the rubric is late, the assignment is late. Additional Details ? Your response line must be on a single line, bracketed by lines of asterisks as per the example output. CS237 SP2018 Assignment #2 100 Points Due: 11/21 11:59pm Late Policy Programs turned in by the posted due date is worth 120%, 7 days after that is 100%. After that it is worth 0%. Cheating Policy There is a zero tolerance policy on cheating in this course. You are expected to complete all programming assignments on your own. Collaboration with other students in the course is not permitted. You may discuss ideas or solutions in general terms with other students, but you must not exchange code. (Remember that you can get help from me. This is not cheating, but is in fact encouraged.) I will examine your code carefully. Anyone caught cheating on a programming assignment or on an exam will receive an “F” in the course, and a referral to Judicial Procedures. CS237 Assignment #2 100 Points Name: _______________________ RedID: _______________________ Masc: _______________________ Date: _______________________ CS237 Assignment Rubric Full Credit 3 Points Partial Credit 2 Points Little Credit 1 Point No Credit 0 Points Program Correctness Program produces correct output for all input. Program produces correct output for all input except edge cases. Program produces mostly correct output OR correct output on multiple lines. Program fails to produce correct output. Program Assembly Program Assembles with no errors. Program Assembles with no errors. Program attempted but contains few errors. Program has many errors. Programming Style Labels, Operators and Operands are all neatly laid out. Inconsistent layout of labels, operators or operands. Poor layout of labels, operators leads to reduced readability. Severely impaired readability or comprehension of code. Naming Conventions Naming scheme increases readability. Some confusing naming conventions. Poor naming conventions hinders comprehension. Naming conventions increases work required. Documentation All documentation adequately described. Most documentation attempted. Little documentation attempted. Not attempted. Electronic and Physical Submission Electronic correctly submitted. Minor errors in submission or differences in submissions. Major errors or incomplete. Either submission missing. CS237 Assignment #2 100 Points