Homework08 (1) .pdf

File information

Original filename: Homework08 (1).pdf
Title: Microsoft Word - 2525 2013 01 03 PA 08.docx
Author: mack

This PDF 1.4 document has been generated by RAD PDF / RAD PDF - http://www.radpdf.com, and has been sent on pdf-archive.com on 30/04/2013 at 11:14, from IP address 75.171.x.x. The current document download page has been viewed 732 times.
File size: 34 KB (2 pages).
Privacy: public file

Download original PDF file

Homework08 (1).pdf (PDF, 34 KB)

Share on social networks

Link to this file download page

Document preview

CSCI 2525

Program Assignment 8

Spring 2013

Due date
Monday, May 13, 2013
Point value
This assignment is worth 20 points. The points will be distributed as follows:
Control Alorithm as Described Below
User Input Parsing
Rational Number Output
Use of Procedures
Use of Macros
Use of Structs


Program Objectives
an ability to design software and/or hardware experiments, as well as to analyze and interpret data (ABET c);
Delivery Method
This is a multimodule program, so bundle your files as a single zip file named pa8.zip. Send this file as an
attachment in an email you send to the class account. Put the assignment number in the subject field and your
name in the body of the email. Submission should be as follows:
1. pa8.asm. This is the driver file with the startup procedure MAIN.
2. pa8functions.inc. This is the file containing the prototypes of your helper procedures.
3. pa8functions.asm. This is the implementation file for your helper procedures.
4. pa8structs.inc. This is the file that contains your structs.
5. pa8macros.inc. This is the file that contains your macros.
6. Include your entire solution and project files in a single zip file.
7. The solution should be compilable when I extract it.
8. Email your assignment to mack@gammeter.com
9. Be sure to put 2525 and 8 in the subject line.
Perform basic arithmetic on rational numbers. A rational number, which is a number that can be represented by
the ratio of two integers, will be represented by a struct that has two decimal members, each of type SWORD.
The program must execute as follows:
1. Prompt user for a rational number (two inputs, must be comma separated integers). We will call this
input #1.
2. Display rational number input #1 as a tuple, as well as an real expression with up to 10 decimal places.
For example, 4/3 would display as “[4,3]: 1.3333333333”.
3. Prompt the user to select a standard arithmetic operators (+, –, * and /) on the rational numbers, as well
as the option ‘e’ to exit.
4. If the user input the character ‘e’ or ‘E’, then goto step 8. Otherwise, if the input is invalid, notify user
and goto step 3.
5. Prompt user for an additional rational number. We will call this input #2.
6. Perform the arithmetic operator on inputs #1 and #2. The result now becomes input #1.
7. Goto step 2.
8. Exit program.

CSCI 2525

Program Assignment 8

Spring 2013

Extra Credit (+5):
• Allow the user to input either comma separated integers (3,10), or a decimal value (0.3)

The resultant rational of each operation must be reduced.
The rational number input by user must be valid. For example, “1,0” would be invalid.
Main procedure must be concise and consist of procedure/macro calls defined in other files.
Do not use directives such as .IF, .WHILE and the like.
You may use Irvine32 procedures.

Document preview Homework08 (1).pdf - page 1/2

Document preview Homework08 (1).pdf - page 2/2

Related documents

homework08 1
crefcard v2 2
s17cs280program2 s008 102 draft
math words

Link to this page

Permanent link

Use the permanent link to the download page to share your document on Facebook, Twitter, LinkedIn, or directly with a contact by e-Mail, Messenger, Whatsapp, Line..

Short link

Use the short link to share your document on Twitter or by text message (SMS)


Copy the following HTML code to share your document on a Website or Blog

QR Code

QR Code link to PDF file Homework08 (1).pdf