# Advance Programming Language concepts

Individual Assignment

Page 1 of 6

1.0

COURSEWORK TITLE A simple application development using functional and logical programming languages.

2.0

LEARNING OUTCOMES At the end of this coursework, you should be able to: y y Express queries, facts and rules in a logic programming language. Implement primitive recursion and higher-order functions in a functional language.

3.0

THE COURSEWORK OVERVIEW You are required to develop a simple application using Haskell for Functional Programming Concepts and Prolog for Logic Programming Concepts. You can use any application scenario of your choice but your applications should have the following parts: Haskell Application: i) Suitable user interface (Text based Menu). ii) Business logic (certain transactions/ data manipulations) ± at least 5 modules/functions need to be used; each module should have specific functionality. iii) Higher Order functions ± all the above modules should have higher order functions. Library functions also can be considered. Wherever it is not possible can be exempted but to score higher marks use higher order functions. iv) Primitive recursion ± Wherever is possible/necessary need to be used. Prolog Application: i) Facts (minimum 20) ± at least some facts should have structures. ii) Rules (minimum 10) ± at least some rules should have AND/OR logics. iii) Queries (minimum 10) ± test all queries without any duplicates.

Possible sample scenarios are given below but these are just for guidance. You do not need to stick rigidly to this idea: Haskell application: Simple banking application with the following functionalities: y y y
Level 3

Check account details Money deposit Money transfer
Asia Pacific Institute of Information Technology 2011

AND logic. eg: daughter (Z. define family relationships through bloodlines. The front cover should be presented with the following details: Module Coursework Title Intake Level 3 Asia Pacific Institute of Information Technology 2011 . For printed copy. Prolog application: Create a set of Prolog rules which.X):. Create a text based menu to handle these functionalities.pl with given facts.married_couple(X. Printed form (Documentation) Standard format Font Size: 12 Font: Times New Roman Line Spacing: Single Justify: Align text to both left and right margins. Hints: i) Facts should have structures. a protective transparent plastic sheet can be placed in front of the report to protect the front cover. 4.Y).Y)).mother(Z. Paper: White A4 Size Only Soft bound binding: Comb binding The document should have the following: A) Cover Page: All reports must be prepared with a front cover. recursion technique can be used in the text based menu.pl.married_couple(X.0 DELIVERABLES: Submission should be in printed form (documentation) and softcopy of the application.Y) Instructions: y Create the file family.Advance Programming Language concepts Individual Assignment Page 2 of 6 y y Money withdraw Check balance Hints: All the above functionalities should have to implement higher order functions. y Test your rules. Make sure they give a complete result set and there are no duplicates. ii)Rules should have AND/OR logics. given a set of basic facts about a family tree. eg: mother_in_law(Z. y Create rules in the given order and put them in family.

*Available from http://www. S.E. M.N. McGraw-Hill. Test Plan with expected results. Date Completed (the date the report is due to be handed in).K.htm (Accessed 19 November 1995) Danang.. Available from http://libinfor. /** * Following source code obtained from (Danang. 2002) */ int noshape=2. All references must be made using the Harvard Naming Convention as shown below: The theory was first propounded in 1970 (Larsen. Proper referencing of the resources should be evident in the document. S. Larsen (1983) is among those most energetic in their opposition«««. Larsen. 1971). but since then has been refuted. A Guide to the Aquatic Science Literature. Full source codes with proper comments Conclusion Reference C) References You may source algorithms and information from the Internet or books. List of references at the end of your document or source code must be specified in the following format: Larsen. [Accessed 14th *September 2006] Level 3 Asia Pacific Institute of Information Technology 2011 . System limitation and enhancement.asp. London.N. British Medical Journal [Online].K.com/bitmap/cbir. Finding Similar Images [Online].Advance Programming Language concepts Individual Assignment Page 3 of 6 Students¶ names and id¶s Date Assigned (the date the report was handed out).edu/acquatic. 2002. The Code Project. M. noshape=GetShape(). A. B) Contents: Abstract/Overview of the system. A.codeproject. All the screen shots with explanation.ume. 1983.maine.E. 1971.

Available from http://www. University of Western England.htm.uweac. 50% marks are allocated to the Haskell application development.uk/library/resources/general/info_study_skills/h arvard2. To award 70% of marks the following criteria will be considered: Haskell: 50 Marks y Idea / Logic : 5 Marks y User Interface(Such as Text Based Menu): 5 Marks y Minimum 5 Modules / functions: 15 Marks y Implementation of Higher Order Functions in all modules: 15 Marks y Implementation of Primitive Recursion (wherever it is necessary) : 5 Marks y Quality of Source code : 5 Marks Prolog: 20 Marks y Idea / Logic : 5 Marks y Facts ( Minimum 20 Facts) : 5 Marks y Rules ( Minimum 10 rules): 5 Marks y Queries( Minimum 10 queries): 5 Marks Level 3 Asia Pacific Institute of Information Technology 2011 . 20% marks are allocated to the Prolog application development. 20% marks for the report (documentation) to accompany the application and 10% marks for presentation. 5. 2003.e..m. SOFTCOPY: Your CD should contain the following files: i) Documentation file (i.Advance Programming Language concepts Individual Assignment Page 4 of 6 Further information on other types of citation is available in Petrie. A. Assessment of applications (70 marks) This will be assessed by your lecturer during presentation/demonstration.00 p. [Accessed 4th September 2003]. England. UWE Library Services Study Skills: How to reference [online].doc file if using Ms-word) ii) Program file (Haskell source code and Prolog file with tested query results) SUBMISSION: All documentation and CD must be submitted on the due date at 7. or earlier to the administration department.0 ASSIGNMENT ASSESSMENT CRITERIA The marks allocation of the assignment is divided into four parts. .

each student should be able to explain/demonstrate in detail his/her work as well as answer the questions posed.Advance Programming Language concepts Individual Assignment Page 5 of 6 Report (Documentation) (20 marks) This report must provide the complete contents based on the requirements to receive marks of 20%.0 Demonstration/presentation of your work to the lecturer (10 marks) The presentation should provide a comprehensive discussion of the system.0 PERFORMANCE CRITERIA A: 70% + This grade will be assigned to work which is considered to be of very high standard and which meets 100% of the basic requirements listed and more. Work at this level must provide clear evidence of a variety of advanced concepts / knowledge in implementing primitive recursion and higherorder functions in Haskell. The following criteria will be considered to assess your presentation/demonstration: y y y Clarity of explanations Ability to answer queries Skills and knowledge NOTE: IF YOU ARE FAIL TO ATTEND/DEMONSTRATE YOUR SYSTEM. Evidence of technical knowledge and practical skills essential for programming in a functional/logical paradigm should be made available. B: 60-69% This grade will be assigned to work which is considered to be of high standard and which meets at least 80% of the basic requirements listed above and if possible. 6. facts and rules in a logic programming language. Level 3 Asia Pacific Institute of Information Technology 2011 . more. The final system should be functional and satisfy all the requirements of the assignment. All work should be documented and referenced well. During presentation. During presentation. Express queries. the student should be able to explain in detail the work that has been done. The document should be concise but should include all the contents which are recommended in section 4. ONLY DOCUMENTATION MARKS (20%) WILL BE AWARDED. Work at this level must provide evidence of implementing primitive recursion and higher-order functions in Haskell.

Work that is not documented adequately.Advance Programming Language concepts Individual Assignment Page 6 of 6 Express queries. D: 40-49% This grade will be assigned to work which is considered to be of average standard and which meets at least 50% of the basic requirements listed above. Express queries. Such a program may display a list of compilation errors and may not even run when executed. All work should be adequately documented and referenced. During presentation. the student should be able to explain well most of the work that has been done. Express queries. the student is not able to explain briefly the work that has been done. lacks referencing and does not display proper program structure would fall in this category. Level 3 Asia Pacific Institute of Information Technology 2011 . During presentation. Work that is not documented adequately. the student should be able to explain briefly the work that has been done. Work at this level must provide evidence of implementing primitive recursion and higher-order functions in Haskell. During presentation. lacks referencing and does not display proper program structure would fall in this category. Work at this level must provide evidence of implementing primitive recursion and higher-order functions in Haskell. All work should be adequately documented and referenced. the student is not able to explain briefly the work that has been done. F: 0-29% Work at this level will generally be of very low standard where it may even fail to meet at least 40% of the basic requirements listed above. Such a program may display a list of compilation errors and may not even run when executed. facts and rules in a logic programming language. the student should be able to explain well most of the work that has been done. During presentation. The final system should at least compile with minimal errors or run when executed. Evidence of technical knowledge and practical skills essential for programming in a functional paradigm should be made available. Evidence of technical knowledge and practical skills essential for programming in a functional paradigm should be made available. more. All work should be adequately documented and referenced. E: 30-39% Work at this level will generally be of low standard where it may even fail to meet at least 50% of the basic requirements listed above. During presentation. The final system should have functionality and at least compile with no errors and run smoothly when executed. C: 50-59% This grade will be assigned to work which is considered to be of good standard and which meets at least 60% of the basic requirements listed above and if possible. facts and rules in a logic programming language. facts and rules in a logic programming language.

Sign up to vote on this title