Skip to content
Permalink
75530368cf
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 78 lines (61 sloc) 3.7 KB
SE4102 Programming Language Assignments (PLA)
Due Dates Listed for Each Project
PLA1 C Program - Due January 29, 11:59pm
Complete the Word Count Functionality (WCF) and Word Frequency Functionality
(WFF) in C as described in: CommonProbBackground.pdf
Test your program using: http://www.engr.uconn.edu/~steve
Utilize gcc and send me a .c file. Make sure it compiles and runs on tge command line
in Linux.
PLA3 Modula-2 Program - Due February 26, 11:59pm
Implement the Word Frequency Function (WFF) in Modula-2 using findwords.mod as a
basis, as described in: CommonProbBackground.pdf
You need to develop a dual solution (two programs) for this project:
I. Single module solution using records based off of findwords.mod sample code
that outputs to stdout a list of words and their frequency.
II. Single module reworking your solution from I into a read procedure that reads the
lines into the document variable of type AllLines, a wff procedure that generates
the word frequency in the wordsindoc variable of type AllWords and the
WordFreq record, and a sortandprint procedure that outputs to stdout a list of
words and their frequency in alphabetical order.
Utilize XDS Modula-2 https://www.excelsior-usa.com/xds.htmland send me your .mod
file.
PLA4 Software Evolution of an Ada Program - Due March 9, 11:59pm
Modify an existing word frequency function Ada program (u_words_min.adb) or
(u_words_tight.adb) that does word frequency by assuming that there is one word in
every line of the input. Both of the adb files assume a word of 20 characters as a string
? in the posted web copies of the two files, this has been increased to 120 which has the
result of reading the entire line and treating the entire line as one large word which can
include spaces. So, when the program is compiled and run, the input generates the
following output:
Note the Control Z carriage return that is EOF and then generates the output. This
programming project is an exercise in learning a new language by having to modify and
extend someone else?s code. The specific extensions are as follows for three separate
versions:
V1. Change the original program to alphabetically sort the outputted list of words?
first executable.
V2. + V1 Change the logic so that the words within each line are identified? this
would then result in a full word frequency functionality and if the sort has been
implemented, it will now sort the entire list ? second executable.
V3. +V1+V2 Change the program so that the data is read from input.txt and written to
output.tex? third executable.
PLA5 Word Index Using Strings in Ada - Due March 26, 11:59pm
This assignment extends PLA3v3 with a word index that tracks the line(s) within the
input file where each word occurs. There may be multiple occurrences of the word in a
file. Current output of PLA3v3 is:
Goodbye 4
Hello 1
World 1
You are to update the output to:
Goodbye: in lines 1-2-5-6-6 wc=5
Hello: in lines 3 wc=1
World: in lines 3 wc=1
In addition, change you assumptions on words:
Words for the word count and index must take into consideration the following: Each
word must be at least one character and start with a letter. If a word has 2 or more
characters, then the second and successive characters can be letters, digits, the
underscore, or the hyphen. Continue to recognize and discard other characters. Also,
note that you must eliminate white space (multiple spaces or tabs) between words.
For a suggested solution approach, extend the various data structures (Word and
Word_List) with the LineNo (that word occurred in) and curr_line (of the file). In
the new sample code, new_u_words_min, these have both been added. The output
is shown below where the first number is the last line and the second the word count.