Main features of a lazy functional language

Assignment Help Programming Languages
Reference no: EM132903805

CP50065E Functional Programming - University of West London

Learning outcome 1: Understand the functional model in which a program is a set of nested expressions.
Learning outcome 2: Design recursive functions using base and recursive cases.
Learning outcome 3: Understand the main features of a lazy functional language.
Learning outcome 4: Write, understand and analyse functional programs in Haskell.

Title Accounting program
Task details The purpose of this assignment is to apply knowledge gained throughout the module to a design and development project. To this end, implement a small program and write a short report about your implementation:

Accounting program
Write a text-based accounting program for recording transactions to and from an account. A transaction is either a cash withdrawal, a cash deposit, a transfer (to another account) or a receipt, and consists of the transaction value (in Pound Sterling, Dollar, or Euro), a reference field (for recording the purpose), and, if applicable, the sender/receiver account number. The program should have the following features:
Users will be able to deposit and withdraw an amount in cash. The account is in Pound Sterling, but transactions can be either in Pound Sterling, Dollar, or Euros, and should be recorded as such.

The program will have preset exchange rates for Pound Sterling, Dollar and Euro, but the user can change these between transactions.

Transactions can be cancelled. Upon cancellation, the original transaction is kept in the ledger but marked as reversed. And an additional correctional transaction be lodged. (For example, a user deposits 100 Pound Sterling in transaction A. Later, this transaction is cancelled.
Transaction A is then marked as reversed, and a correctional transaction A' is made, withdrawing 100 Pound Sterling.)

Users will further be able to list all transactions and all transaction data, optionally filtered by transaction type (deposit, withdrawal, transfer, receipt) or currency (Pound Sterling, Dollar or Euro), and/or sorted by value, or sender/receiver number.

Users will also be able to search transactions by sender/receiver account number.

Last but not least, users will be able to query the total current account balance and the average transaction value.

The program should have explanatory text as necessary and handle input errors etc. gracefully.

Implement application features in a command processing style. For example, depositing and withdrawing amounts might be recorded via commands such as
receive 100 pound "tax refund" 1234567890
for logging the receipt of 100 Pound Sterling from account no. 1234567890,
withdraw 100 dollar "pocket money" for logging the withdrawal of 100 Dollars, search 1234567890
for listing all transactions to and from account no. 1234567890,
list
to see all transactions, or
list filter "deposit+dollar"
for listing all deposits in dollar.

Report
Write a short report (less than 500 words). The report needs to include eight screenshots showing main application functions (withdraw, deposit, transfer, receive, list, search, cancel, set exchange rate), and detail how functional programming concepts were applied.
The report should also include a brief overall reflection of what went well, what did not go well, and what you would do differently if you were given a similar task in the future.

Attachment:- Functional Programming.rar

Reference no: EM132903805

Questions Cloud

What is the test statistic z : A factory that manufactures bolts is performing a quality control experiment. Each object should have a length of no more than 20 centimeters.
Corporate social responsibility : 1. "Our economy depends on nature, not the other way around, and companies will destroy the economy if they destroy nature"
Pressurize the suppliers and vendors to help the company : The Walmart Sustainability Hub is a website created by Walmart for its suppliers to learn about sustainability initiatives of Walmart and find opportunities to
What is the alternative hypothesis : A factory that manufactures screws is performing a quality control experiment. Each object should have a length of no more than 14 centimeters. The factory beli
Main features of a lazy functional language : Write a text-based accounting program for recording transactions to and from an account. A transaction is either a cash withdrawal, a cash deposit, a transfer
Calculate probability of no claims will be filed : An insurance company has determined that each week an average of five claims are filed in their Atlanta branch. What is the probability that during the next wee
Implementation of the performance management system : Kindly help with a research proposal please. My title is An investigation into the implementation of the Performance Management System
Contrast investors use of capital markets : Contrast investors' use of capital markets and their use of money markets.
Design recursive functions using base and recursive cases : Understand the functional model in which a program is a set of nested expressions and Design recursive functions using base and recursive cases

Reviews

Write a Review

Programming Languages Questions & Answers

  Create an order confirmation/shipping web page in perl

Create an order confirmation/shipping web page in Perl that displays the items that the customer ordered the quantities, the price of the item, and the extended price. Show the customer's name and require that the user enter an address and a tele..

  Determine the conditions in which datagrams are dropped

Use the attached client and server programs to make a test kit to determine the conditions in which datagrams are sometimes dropped.

  Write a perl program to parse out the file

Do a search for the term "anthrax" in PubMed. Then search the Protein and Nucleotide databases -

  Devise an algorithm that finds all modes

Devise an algorithm that finds all modes. (Recall that a list of integers is nondecreasing if each term of the list is at least as large as the preceding term.)

  Create a console application called mythread

Create a console application called myThread. Within the application, create a thread called Updater. This thread will be used to update a running sum of values entered by the user.

  Write menu driven program that make coffee shop operational

Jason has opened a coffee shop at the beach and sells coffee in three sizes: small (9oz) medium (12oz) and large (15oz). Small cost is $1.75 medium costs $1.90 and large costs $2.00. Write a menu driven program that will make the coffee shop opera..

  Create a test table in ms word to test your program

Create a TEST TABLE in MS WORD to TEST your program to make sure your program works as expected

  Write a program that creates a file called grades.txt

Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade.

  Write looping structure pseudocode accepting employee data

Write looping structure pseudocode which prompts user for employee data; application continues to accept data for new employees until user enters 0 for ID number to indicate desire to quit.

  Analysis of a group of weight measurements

Prepare a program that takes an input weight and puts the correct value - An analysis of a group of weight measurements involves converting a weight value into an integer category number that is determined as given:

  Write down program which permits to play tic tac toe game

Write down the program which permits 2 players to play tic tac toe game. Program should contain class tictactoe to implement tictactoe object.

  Describe two other techniques for validating your document

This week covered validation and the use of validators. Describe at least two other techniques for validating your document that does not involve submitting it through an online validator.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd