Examine the small sample functions

Assignment Help C/C++ Programming
Reference no: EM132407406

OBJECTIVE

The objective of this assignment is to apply your newly learned Erlang knowledge to build a program from scratch.

ASSIGNMENT DESCRIPTION

For this assignment you will rewrite the programming assignment you have done in C. All high-level program logic remains the same. Since, however, now you are modelling this logic in Erlang, the following requirements must be met:
• Each directory entry / file in the program is to be modeled by a tuple that consists of a filename and its size in bytes that will be entered by the user, and the number for the beginning block and the number of blocks used by the file that will be generated by the program
• The directory table should be modeled by a list
• Each block in the program is to be modeled by a tuple that consists of a block number, how much of this block is used and the amount of internal fragmentation
• The block table should be modeled by a list

I/O: Since we haven't discussed interactive input, examine the small sample functions below for interactive input handling.

integer input handling:
input() ->
S = io:get_line("Enter: "),
{Int,_} = string:to_integer(S), io:fwrite("echo ~i ~n", [Int]), case Int of
1 -> input();
2 -> input();
3 -> input();
4 -> done
end.

string input handling:

input() ->
S = io:get_line("prompt: "),
{Strip,_} = lists:split(length(S)-1, S), io:fwrite("echo ~s ~n", [Strip]), case string:equal(Strip, "quit") of
true -> done;
_ -> input()
end.

PROGRAM SPECS

Your program is to include the following functions (follow the naming conventions if you want your program to be graded):
• mymain() this function is similar in its logic to how main functions in C and Java, i.e. starts and drives the program; the user will call this function from the shell in order to start the program
• printMenu() prints the menu choices to the shell
• blocksAsString( ListOfBlockTuples) given a list of tuples representing the blocks returns that list as a string
• directoryAsString(ListOfFileTuples) given a list of tuples representing the files returns that list as a string
• other functions you deem appropriate to achieve proper modularization

In addition, your program must fulfill the following requirements:
• Only lists and tuples are to be used, no other data structures allowed
• Your driver file should be called pr2.erl
• Helper functions should NOT be listed in an export statement
• Include comments - the header with your name, program name, date; function headers that describe the purpose of each function; code comments that describe the high-level logic
• Your program is to be contained within one file called pr2.erl ; If you decide to use a multiple file structure, you can call your other files according to your preference but function mymain must reside in pr2.erl

• Your program has to follow basic stylistic guidelines, such as proper indentation (it is better to use whitespaces to ensure that's the case), meaningful variable names, etc.
• You are to save your shell with sample calls to your functions to a file called pr2_tests.erl

EXECUTIVE SUMMARY

You are to write an executive summary. It should be written as a txt file. In the file, describe what you have done to complete the assignment in about 500 words and compare your C and Erlang approaches to this program. How has programming paradigm affected your work/choices? Which one do you prefer and why? The word count is not strict, so do not worry about going slightly over; however, summaries that are < 400 words or are trivial in nature (representing little thought or effort) will not get full credit.

Reference no: EM132407406

Questions Cloud

Describes the process of maintaining blockchain apps : Describes the process of maintaining blockchain apps after deployment. Create a new thread, choose one aspect of app maintenance from the material
Project management process group phases : What are some examples of differences between the project management Process Group phases and the project life cycle phases?
Social network analysis-nodexl in analyzing website : I need some who is good at using Social Network Analysis , NodeXL in analyzing a website. I already have the website i want to analyze.
Estimate the value of the equity in the firm : a. Estimate the value of the firm. b. Estimate the value of the equity in the firm, and the value per share.
Examine the small sample functions : Examine the small sample functions below for interactive input handling - write an executive summary. It should be written as a txt file. In the file
What real world job experience should CIO have : What real world job experience should a CIO have? is it a business background, a financial background, an IT background or something else?
How can you maintain leverage over both your suppliers : What are the chances of other donut shops entering your market over the next year? Two years? Five years? How can you minimize the threat?
System dynamics and multi-actor systems modeling : Find 5 research articles related to the topics discussed - System dynamics, Multi-actor systems modeling, Complex adaptive systems modeling.
What is the net present value of the sweden project : What is the net present value of the Sweden project? Is the project acceptable based on NPV)

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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