Difference between revisions of "Dynamic Spreadsheet Assignment"
Jump to navigation
Jump to search
(→list) |
|||
Line 31: | Line 31: | ||
(define (string->cell s) | (define (string->cell s) | ||
(error 'not-yet-implemented)) | (error 'not-yet-implemented)) | ||
+ | |||
+ | * if s is the empty string, evaluate to void | ||
+ | * if s represents a number, evaluate to that number | ||
+ | * if s starts with "(" and ends with ")", evaluate to a form suited for eval | ||
+ | * otherwise, evaluate to s | ||
==csv->spreadsheet== | ==csv->spreadsheet== |
Revision as of 13:58, 30 March 2022
Contents
Motivation
Code To Use
general
void
number
string
list
Code To Implement
file: | src/main/racket/spreadsheet/spreadsheet.rkt | |
functions: | string->cell csv->spreadsheet row-count row-at sheet sum-row |
string->cell
(define (string->cell s) (error 'not-yet-implemented))
- if s is the empty string, evaluate to void
- if s represents a number, evaluate to that number
- if s starts with "(" and ends with ")", evaluate to a form suited for eval
- otherwise, evaluate to s
csv->spreadsheet
(define (csv->spreadsheet matrix) (error 'not-yet-implemented))
row-count
(define (row-count sheet) (error 'not-yet-implemented))
row-at
(define (row-at sheet row-index) (error 'not-yet-implemented))
sum-row
(define (sum-row sheet row-index) (error 'not-yet-implemented))
Test
file: | spreadsheet_test.rkt | Test |
source folder: | src/test/racket/spreadsheet |
note: ensure that you have removed all printing to receive credit for any assignment.