×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

1 review
by: Alaina Sharp

36

1

7

# coms 2203 notes week 3 COMS 2203

Alaina Sharp
Arkansas Tech University
GPA 4.0

Enter your email below and we will instantly email you these Notes for computer programming II

(Limited time offer)

Unlock FREE Class Notes

Everyone needs better class notes. Enter your email and we will send you notes for this class for free.

These notes cover an algorithm and what specific words should mean and their notations.
COURSE
computer programming II
PROF.
Morell L
TYPE
Class Notes
PAGES
7
WORDS
CONCEPTS
computer programming
KARMA
Free

## 1

1 review
"The content was detailed, clear, and very well organized. Will definitely be coming back to Alaina for help in class!"
Kaela

## Popular in Computer Science and Engineering

This 7 page Class Notes was uploaded by Alaina Sharp on Monday February 1, 2016. The Class Notes belongs to COMS 2203 at Arkansas Tech University taught by Morell L in Fall 2016. Since its upload, it has received 36 views. For similar materials see computer programming II in Computer Science and Engineering at Arkansas Tech University.

×

## Reviews for coms 2203 notes week 3

The content was detailed, clear, and very well organized. Will definitely be coming back to Alaina for help in class!

-Kaela

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 02/01/16
Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 Notation for Algorithms  List = < > [ ]  ‘ ‘ or “ “ mean string  2 3 4 just numbers  HOMOGENEOUS LIST  Let vowels < ‘a’ ‘e’ ‘I’ ‘o’ ‘u’>  Let Primes^name [2 3 5 7] ALSO primes [ 2, 3, 5, 7]  HETEROGENEOUS LIST  A list can contain another list  <12 [ ‘a’ ‘b’ ‘c’] 5 6> Standard algorithms for processing lists categories: Print Algorithms for printing lists Rearrange Algorithms for rearranging lists Organize Algorithms for building lists Collect Algorithms for collecting information from lists Edit Algorithms for modifying lists Search Algorithms for searching lists Sort Algorithms for sorting lists Data = collection of values Elementary (non decomposable) (decomposable) Int double float string array Structured type is a composite type that imposes a structure (an organization) on the component. Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 Let L name Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 <2 8 3 5 9> Initializing arrays: int L [] {2, 8, 3, 5, 9}; //only with c++ 11 the advantage of leaving it blank is so if you add or take away numbers from your list, the computer will fix it for you. int L [] = {2, 8, 3, 5, 9}; int L [5]; L [0] = 2; L [1] = 8; And so on and so forth. When we declare L, it is the address of the first byte in the array, but not the array itself. Program header /* Program name – program description Author: Alaina Sharp Modification History Date Action 01/22/16 --original version */ Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 Int I; Int L [] { numbers} Int Lsize = sizeof(L) / sizeof(int); For( i = 0; i < Lsize; i++) Cout << L[i] << endl; return 0; sizeof(L) looks for the byte size of the array. ***2^8 = 256 Generate each (n) from L [+] @first: Let s name 0 @iter: Let s name s + n Int n; Int sum; For(n = 0, sum = 0; n <= Lsize; ++n) n = sum + L[n]; p Let hand name < "AH", "2S", "3D", "JH", "2C" > The simplest way of printing it is: Print hand which displays: <"AH" "2S" "3D" "JH" "2C"> cd ~morell/2203 Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 PuTTy Inside main parenthesis int argc, char **argv Cerr << “frequencycount: requires a file name on commandline” << end; Exit(1); Alg  Code When I say this ….. I translate it like this Let put(word) into (aliaswords) string words[max]; Name Procedure int wordsSize; String word; Void put(string word, string words[max], int&wordsSize) Generate each (w) from words  for(int w = 0; w < wordsSize && word > = w ; ++w) While word >= w Insert word before w Insert before a b c [w] Insert after Put (x) into (y) put(x, y, size) W as an iterator for the list words words[w] Word as an iterator for input input[word] Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 Input  The dog, the cat, and the fish are the three most common pers Output Value Count The 1 and 1 are 1 cat, 1 common 1 dog, 1 fish 1 most 1 pets 1 the 3 three 1 Let rec name [“value” : “cat: , “count” : 1] Rec[“value”] Rec[“count”] Select Off(w) // append word to end of the list words Word < w[1] // insert word in the middle Notes – Wednesday/Friday 1/20/16 --1/22/16 – 1/25/16 – 1/27/16 – 1/29/16 2/1/16 Otherwise  // bump count by one for the duplicates

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Steve Martinelli UC Los Angeles

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Jennifer McGill UCSF Med School

#### "Selling my MCAT study guides and notes has been a great source of side revenue while I'm in school. Some months I'm making over \$500! Plus, it makes me happy knowing that I'm helping future med students with their MCAT."

Steve Martinelli UC Los Angeles

#### "There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com