cs320-prog-lang

所属分类:Kotlin编程
开发工具:JavaScript
文件大小:6613KB
下载次数:0
上传日期:2022-12-05 18:13:58
上 传 者sh-1993
说明:  编程语言概念分配
(Programming Language Concepts Assignments)

文件列表:
Go (0, 2022-12-06)
Go\hw8 (0, 2022-12-06)
Go\hw8\Example2.exe (1969664, 2022-12-06)
Go\hw8\Sample_A8.txt (218, 2022-12-06)
Go\hw8\hw8.exe (2064384, 2022-12-06)
Go\hw8\hw8.go (1213, 2022-12-06)
Go\hw9 (0, 2022-12-06)
Go\hw9\hw9.go (1798, 2022-12-06)
Haskell (0, 2022-12-06)
Haskell\hw3.hs (325, 2022-12-06)
Haskell\hw4.hs (1517, 2022-12-06)
JavaScript (0, 2022-12-06)
JavaScript\Hw1.js (1257, 2022-12-06)
JavaScript\Hw1_SampleFile.txt (111, 2022-12-06)
Kotlin (0, 2022-12-06)
Kotlin\hw6 (0, 2022-12-06)
Kotlin\hw6\SampleFile_A6.txt (85, 2022-12-06)
Kotlin\hw6\hw6-AST1.png (22391, 2022-12-06)
Kotlin\hw6\hw6-AST2.png (23843, 2022-12-06)
Kotlin\hw6\hw6.jar (4691572, 2022-12-06)
Kotlin\hw6\hw6.kt (1699, 2022-12-06)
Kotlin\hw7 (0, 2022-12-06)
Kotlin\hw7\hw7-AST.png (131566, 2022-12-06)
Kotlin\hw7\hw7-GSD1.png (20448, 2022-12-06)
Kotlin\hw7\hw7-GSD2.png (35568, 2022-12-06)
Kotlin\hw7\hw7.kt (1089, 2022-12-06)
TypeScript (0, 2022-12-06)
TypeScript\Hw2.js (5257, 2022-12-06)
TypeScript\Hw2.ts (5160, 2022-12-06)
TypeScript\SampleFile_A2.txt (212, 2022-12-06)
TypeScript\hw2.gv (1475, 2022-12-06)

# HW3 HowTo - GOLang Erin Phillips | CSCI 320 | hw8.go ## What It Does As per assignment guidelines, hw8.go accepts 2 command line arguments, a text file and an integer(0,1,2) go run hw8.go Sample_A8.txt 2 Each line of the text file is used to instantiate a Person struct that contains the values: last name, first name, and series. Each Person is then saved into a slice of Person structs The program sorts based on the given integer from the command line. 0 -> sorts on last name\ 1 -> sorts on first name\ 2 -> sorts on series String() prints the slice contents in an organized manner: firstName lastName: series ## Additional Information At first, I tried to implement the sort interface by explicitly coding `type sort interface {...}` However, I found that difficult as the interface could only have 1 method. Instead I opted to modify sort anonymously.

近期下载者

相关文件


收藏者