Grace Hopper Center

CSC 223 Weekly Assignments: Week 10

CSC 223


Overview

Welcome to 4th quarter, your final quarter in high school! This week will study sorting algoriths.

Friday and Monday, April 17th and 20th

Classwork / Homework / Evaluation

Our immediate goal is to create a shared library for reading and writing integers to files. I've started working on it here, and hopefully with your help we can complete this on Friday and have it ready for use.

Download the files to your own git repos and work with our new CP/M workflow to try to get the LOADNUMS library to work. We'll talk in class about the approach I'm thinking of taking, and see if we want to follow that approach or find a better one.

Wednesday and Thursday, April 15th and 16th

Classwork

Today we will begin sharing the sorting algorithms that we selected last week. This will be your first graded assignment of our last quarter, which will be evaluated using the rubric provided with the assignment.

After the presentations are shared, I will aggregate them into a single library and make them available to you next class.

Let's begin today with folks who feel confident they have exemplary solutions ready to go. Folks who are less certain can present their sorts on Friday and Monday.

Homework / Evaluation

Read from Section 14.6: Introduction to Sorting on page 433 through the end of the chapter on page 463. We will have a test on this chapter in class on Tuesday and Wednesday of next week (4/21 and 4/22). I will be looking to your presentations, the Points to Remember on page 461, and the Exercises on pages 462 and 463 for inspiration in preparing the test.

Thursday Addendum

I want to standardize our input and output format. How about 100 numbers on 10 lines. The input file can contain:

95 87 252 5 226 80 204 115 89 251 2
225 228 224 35 119 81 235 129 93 90
206 28 10 92 48 15 220 88 170 214
116 253 57 163 148 249 161 193 183 219
171 196 147 179 105 3 64 62 41 230
208 42 26 118 243 122 240 53 1 25
194 43 142 162 195 102 65 56 187 59
188 217 168 76 34 185 254 250 128 47
106 131 138 234 231 140 23 127 245 19
121 223 60 38 149 255 141 78 40 

so that we are all working with the same input. (Note: I created make_random_num_file.py and with make_random_num_file.c, which we could use as utilities to create our input files. This lead me to wonder if this could be ported to our BDS C environment, and it can, but with some limitations. Here is MKNUMF.C. You can pass it a seed on the command line to vary the numbers in the file it creates.

Tuesday, April 14th

Classwork / Homework

Period 3B will have class and homework time today to complete their sorting algorithms for presentation on Thursday.