Home CPSC 401

Final Paper

Draft Due: March 31

Due: April 23

Overview

For this project, you will learn and report on a programming language. You will have to install a compiler/interpreter for the language and learn it on your own.

You will write a paper on the language, as well as a program in the language. You will also turn in a rough draft of the paper.


Languages

You may not report on a language that you have programming experience in, or a very common one such as C++, Java, Javascript, PHP, Python etc.

The following table lists some languages that would be a good choice If you prefer to study a language not listed, just ask. No more than five people can report on the same language. Email me when you decide which language you choose.

LanguagePeople
Boo  
Ceylon Jason
CoffeeScript Colin, Noor, John, Dominic, Matt
Clojure  
D  
Dart Thomas B.
Erlang Jerome
F#  
Fantom  
Go Tyler F., Phillip
Groovy Douglas
Lua Alex, Savannah, Ashley, Joe, James
Nim  
Ocaml  
Perl Aaron
R Thomas S., Chris H.
Ruby Austin, Chris R., Peter, Ruth, Tyler H., Carlson
Rust Tori
Scala Matt, Riley
Swift Chris Z., Shehan, Ryan, Harry, Roylando

Topics

Your paper should touch on the following subjects:

The paper should include code samples to highlight particular features of the language.


Paper Details


Draft

The paper draft should include all sections and be as complete as possible. I will provide feedback on the draft.

Program Details

To get experience working with your language, you will write a program that allows the user to play blackjack. In the game of Blackjack, players are dealt cards and try to get a hand of cards that scores as close to 21 as possible without going over. Cards are scored as follows:

CardValue
22
33
44
55
66
77
88
99
1010
Jack10
Queen10
King10
Ace11 or 1

Aces are scored as 11 or 1 based on what is better for the player. If counting an ace as 11 keeps the player under 21, it will count as 11, otherwise, it will count as 1. For example, if the player has the cards Queen, Ace, and 9, then their score will be 20.

If the player has the cards King and Ace, then their score will be 21. A score of 21 is also called "blackjack".

Your program should give the user two random cards, and ask if they want to hit (receive a new card) or stay. At each step, you should display their cards (number and suit). You should keep asking them this until they either choose to stay or get a score over 21.

You should then print out the numerical score. If the score is 21, you should print 'Blackjack!', if the score is over 21, you should print 'Bust!'.

You don't need to provide a way for the user to play multiple games.

Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.