首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
data留学生编程辅导、讲解CS,Java程序、Python编程辅导 讲解Database|解析Haskell程序
项目预算:
开发周期:
发布时间:
要求地区:
Project 4 - Nested Loops and Procedures
Due Sunday by 11:59pm Points 50 Submitting a file upload File Types asm
Available after Feb 7 at 12am
Submit Assignment
Introduction
The purpose of this assignment is to reinforce concepts around procedures, nested loops,
and data validation (CLO 3, 4). Please be sure to thoroughly check the rubric - there are
some specific requirements with point penalties if they are not satisfied.
1. Designing and implementing procedures
2. Designing and implementing loops
3. Writing nested loops
4. Understanding data validation
What you must do
Program Description
Write a program to calculate prime numbers. First, the user is instructed to enter the number of primes
to be displayed, and is prompted to enter an integer in the range [1 ... 200]. The user enters a number,
n, and the program verifies that 1 ≤ n ≤ 200. If n is out of range, the user is re-prompted until they
enter a value in the specified range. The program then calculates and displays the all of the prime
numbers up to and including the n prime. The results must be displayed 10 prime numbers per line,
in ascending order, with at least 3 spaces between the numbers. The final row may contain fewer than
10 values.
Program Requirements
1. The programmer’s name and program title must appear in the output.
2. The counting loop (1 to n) must be implemented using the LOOP instruction.
3. The main procedure must consist of only procedure calls (with any necessary framing). It should
be a readable "list" of what the program will do.
4. Each procedure will implement a section of the program logic, i.e., each procedure will specify how
the logic of its section is implemented. The program must be modularized into at least the following
procedures and sub-procedures:
getUserData
validate
showPrimes
isPrime
farewell
The upper and lower bounds of user input must be defined as constants.
If the user enters a number outside the range [1 ... 200] an error message must be displayed and
the user must be prompted to re-enter the number of primes to be shown.
The program must be fully documented and laid out according to the CS271 Style Guide. This
includes a complete header block for identification, description, etc., a comment outline to explain
each section of code, and proper procedure headers/documentation.
Notes
1. For this program, you may use global variables instead of passing parameters in memory or on the
stack. This is a one-time relaxation of the standards so that you can get accustomed to using
procedures.
2. A number k is prime if it is an integer with exactly 2 distinct divisors: 1 and k. Note that this implies
that
a. 1 is not prime.
b. k must be positive.
3. There are several ways to make your isPrime procedure efficient. Feel free to discuss algorithms
on Piazza and Slack.
4. Check the Course Syllabus for late submission guidelines.
5. Find the assembly language instruction syntax and help in the CS271 Instructions Guide.
6. To create, assemble, run, and modify your program, follow the instructions on the course Syllabus
Page’s "Tools" tab.
Resources
Additional resources for this assignment
Project Shell with Template.asm
CS271 Style Guide
CS271 Instructions Reference
CS271 Irvine Procedure Reference
What to turn in
Turn in a single .asm file (the actual Assembly Language Program file, not the Visual Studio solution
file). File must be named "Proj4_ONID.asm" where ONID is your ONID username. Failure to name
files according to this convention may result in reduced scores (or ungraded work). When you
resubmit a file in Canvas, Canvas can attach a suffix to the file, e.g., the file name may become
2/19/2021 Project 4 - Nested Loops and Procedures
https://canvas.oregonstate.edu/courses/1798799/assignments/8201478 3/8
Proj4_ONID-1.asm. Don't worry about this name change as no points will be deducted because of
this.
Example Execution
User input in this example is shown in boldface italics.
Prime Numbers Programmed by Euclid
Enter the number of prime numbers you would like to see.
I’ll accept orders for up to 200 primes.
Enter the number of primes to display [1 ... 200]: 301
No primes for you! Number out of range. Try again.
Enter the number of primes to display [1 ... 200]: 0
No primes for you! Number out of range. Try again.
Enter the number of primes to display [1 ... 200]: 31
2 3 5 7 11 13 17 19 23 29
31 37 41 43 47 53 59 61 67 71
73 79 83 89 97 101 103 107 109 113
127
Results certified by Euclid. Goodbye.
Extra Credit (Original Project Definition must be Fulfilled)
To receive points for any extra credit options, you must add one print statement to your program
output per extra credit which describes the extra credit you chose to work on. You will not receive
extra credit points unless you do this. The statement must be formatted as follows...
--Program Intro--
**EC: DESCRIPTION
--Program prompts, etc—
Extra Credit Options
1. Align the output columns (the first digit of each number on a row should match with the row above).
(1pt)
2. Extend the range of primes to display up to 4000 primes, shown 20 rows of primes per page. The
user can “Press any key to continue …” to view the next page. Since length of the numbers will
increase, it’s OK to display fewer numbers per line. (2pt)
Grading criteria
2/19/2021 Project 4 - Nested Loops and Procedures
https://canvas.oregonstate.edu/courses/1798799/assignments/8201478 4/8
Project 4 Rubric
Please view the rubric attached to this assignment to understand how your assignment will be graded.
If you have any questions please ask on the course discussion board.
Criteria Ratings Pts
Files Correctly Submitted
Submitted file is correct assignment and is an
individual .asm file.
1 pts
Full Marks
0 pts
No Marks
Program Assembles & Links
Submitted program assembles and links without
need for clarifying work for TA and/or messages
to the student. This assumes the program is
actually an attempt at the assignment. Nonattempts
which compile/link earn no points.
1 pts
Full Marks
0 pts
No Marks
Documentation - Identification Block - Header
Name, Date, Program number, etc as per Style
Guide are included in Identification Block
1 pts
Full Marks
0 pts
No Marks
Documentation - Identification Block - Program
Description
Description of functionality and purpose of
program in student's own words is included in
identification block.
1 pts
Full Marks
0 pts
No Marks
Documentation - Procedure Headers
Procedure headers as per Style Guide: Describe
functionality and implementation of program flow;
list pre- and post-conditions and registers
changed; ...
4 pts
Full
Marks
2 pts
Headers without Conditions
Descriptive headers but lacking
pre- and post-conditions and
'registers changed'
0 pts
No
Marks
Documentation - Section and In-line Comments
Section and In-line comments contribute to
understanding of program flow where necessary,
but are not line-by-line descriptions of moving
memory to registers. See CS271 Style Guide.
Verification - Program Executes
Program executes and makes some attempt at
the assigned functionality.
3 pts
Full
Marks
2 pts
Failed
Attempt
Program is
an attempt at
the correct
assignment
but simply
does not run.
0 pts
Not An Attempt
Program executes but is
either the incorrect
program or some quickly
mashed together
nonsense, submitted only
to 'get a few points'
Completeness - Displays Title & Programmer
Name
Program prints out the programmer's name and
Program Title
1 pts
Full Marks
0 pts
No Marks
Completeness - Prompts for Input (with Bounds)
Prompts user to enter data, specifying bounds of
acceptable inputs.
1 pts
Full Marks
0 pts
No Marks
Completeness - Gets data from User
Utilizes ReadInt or ReadDec to receive user
input. Saves values in appropriately-named
identifiers for validation.
1 pts
Full Marks
0 pts
No Marks
Completeness - Validates User Data
Validates that user-entered values are within the
advertised limits.
2 pts
Full
Marks
1 pts
Partial validation
Neglects to check edge cases,
otherwise functional.
0 pts
No
Marks
Completeness - Displays Results 2 pts
Full Marks
0 pts
No Marks
Completeness - Displays closing message 1 pts
Full Marks
0 pts
Correctness - Displays correct number of prime
numbers
4 pts
Full
Marks
3 pts
Mostly Correct
Edge cases are neglected or
display incorrectly.
0 pts
No
Marks
Correctness - Calculations are Correct
All displayed values are in-order primes,
beginning with the number '2'
6 pts
Full
Marks
2 pts
Not Perfect
Some (fewer than 5) non-prime
values appear, or some primes
(fewer than 5) appear out of order
0 pts
No
Marks
Correctness - Numbers are displays 10 per line
May be a different value if student implemented
Extra Credit option 2. Should still be consistent.
3 pts
Full Marks
0 pts
No Marks
Correctness - Partial lines displayed correctly 1 pts
Full Marks
0 pts
No Marks
Requirements - Limits are CONSTANTs
Min/Max number of primes are defined and used
as CONSTANTs.
2 pts
Full Marks
0 pts
No Marks
Requirements - Program is well-modularized
Program is divided into logical sections based on
function. Program implements all required
procedures with good logical flow according to
class lectures.
10 pts
Full
Marks
8 pts
Lacking some
Procedures
Well
modularized,
but lacking all
required
procedures
1 pts
No
procedures
Well
modularized,
but fails to
utilize
procedures
0 pts
No
Marks
Requirements - Counted loop uses LOOP
instruction
(-10 points if counted loop does not use LOOP
instruction)
0 pts
Full Marks
0 pts
No Marks
2/19/2021 Project 4 - Nested Loops and Procedures
https://canvas.oregonstate.edu/courses/1798799/assignments/8201478 8/8
Total Points: 50
Criteria Ratings Pts
1 pts
1 pts
1 pts
0 pts
0 pts
0 pts
Coding Style - Uses appropriately named
identifiers
Identifiers named so that a person reading the
code can intuit the purpose of a variable,
constant, or label just by reading its name.
(CS271 Style Guide)
1 pts
Full Marks
0 pts
No Marks
Coding Style - Readability
Program uses readable white-space, indentation,
and spacing as per the CS271 Style Guide.
Logical sections are separated by white space.
1 pts
Full Marks
0 pts
No Marks
Output Style - Readability
Program output is easy to read
1 pts
Full Marks
0 pts
No Marks
Extra Credit
Output columns aligned (+1) |
4000 primes with paged output (+2)
0 pts
Full Marks
0 pts
No Marks
Late Penalty
Remove points here for late assignments. (Enter
negative point value)
0 pts
Full Marks
0 pts
No Marks
Pre-filled Primes Penalty
If student utilizes an array, list, file etc.. pre-filled
with primes (more than 2 primes), deduct 20
points here.
0 pts
Full Marks
0 pts
No Marks
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!