PA1 Instructions

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 3

DownloadPA1 Instructions
Open PDF In BrowserView PDF
CS215: Introduction to Program Design, Abstraction and Problem Solving
(Fall, 2015)
Programming Assignment 1
(100 points)
Today’s Date: Thursday, September 10
Due Date: Sunday, September 20
No late submission will be allowed!
Problem Statement
Write a program that allows the user to repeatedly enter positive integers to be converted
into the Roman number system until the user enters -1 to exit the program.
The	
  Roman	
  number	
  system	
  has	
  digits:	
  
M
1000
D
500
C
100
L
50
X
10
V
5
I
1
Numbers	
  are	
  formed	
  according	
  to	
  the	
  following	
  rules:	
  
• Only	
  numbers	
  up	
  to	
  3999	
  are	
  represented.	
  
• As	
  in	
  the	
  decimal	
  number	
  system,	
  the	
  thousands,	
  hundreds,	
  tens,	
  and	
  ones	
  are	
  
expressed	
  separately.	
  
• The	
  numbers	
  1	
  to	
  9	
  are	
  expressed	
  as	
  
	
  
I
1
II
2
III
3
IV
4
V
5
VI
6
VII
7
VIII
8
IX
9
As	
  you	
  can	
  see,	
  an	
  I	
  preceding	
  a	
  V	
  or	
  X	
  is	
  subtracted	
  from	
  the	
  value,	
  and	
  you	
  
can	
  never	
  have	
  more	
  than	
  three	
  I’s	
  in	
  a	
  row.	
  
	
  
• Tens	
   and	
   hundreds	
   are	
   done	
   the	
   same	
   way,	
   except	
   that	
   the	
   letters	
   X, L, C	
  
and	
  C, D, M	
  are	
  used	
  instead	
  of	
  I, V, X,	
  respectively.	
  

A sample output of your program can be as follows:
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 2015
The roman numeral is MMXV
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 1978
The roman numeral is MCMLXXVIII
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 215
The roman numeral is CCXV
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: -215
Your number must be greater than zero and less than 4000
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 1865
The roman numeral is MDCCCLXV
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 4008
Your number must be greater than zero and less than 4000
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 999
The roman numeral is CMXCIX
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: 79
The roman numeral is LXXIX
Integer--Roman Number conversion Tool:
Enter -1 to quite the program.
Please enter a positive integer less than 4,000 you wish to convert: -1
Thank you for using Integer--Roman Number conversion Tool.

In order to keep your program's window from closing, you can call system("pause");
before returning from main. Your program must compile in order to be graded.
Submission:
Open the link to csportal (http://www.cs.uky.edu/csportal), and login to your account
using your linkblue user id and password. Please zip the inside folder (project), and
submit (upload) the zip file through link “PA1”. Note that only one file is allowed to
upload and it should be your zip file. It is a good idea to check that your file is already
uploaded successfully. If not, go back and submit again.

Grading Sheet for Programming Assignment 1
Total: 100 points.
Points
Correctness
Roman numbers are correctly generated for thousands digit,
hundreds digit, tens digit and units digit.
User is allowed to repeatedly use the program till enter -1
to quit.
Program checks whether user input number is in the correct
range.
Submit your project as one zip file through CSPortal
Style
Lay out your program in a readable fashion
Include comments as specified in the lecture notes
User-friendliness in I/O design
Testing
Testing simple cases such as numbers shown in the table on
page 1
Testing normal cases such as examples in the sample output
Testing invalid input
Your Score

Deducted Points
65

12*4
6
6
5
20
5
10
5
15
5
5
5



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
Page Count                      : 3
Title                           : CS215PA1
Author                          : 
Subject                         : 
Producer                        : Mac OS X 10.10.5 Quartz PDFContext
Creator                         : Word
Create Date                     : 2015:09:10 17:37:30Z
Modify Date                     : 2015:09:10 17:37:30Z
Apple Keywords                  : 
EXIF Metadata provided by EXIF.tools

Navigation menu