Comparative Programming Languages Report

Verified

Added on  2019/09/25

|1
|458
|30
Report
AI Summary
This report details a comparative analysis of four programming languages – Java, Python, Lisp, and C – applied to a single programming task. The analysis highlights similarities and differences in their features and how these features impacted the development process. Java and Python, both object-oriented languages, utilized similar features like classes, objects, and dynamic arrays. However, differences in static vs. dynamic typing were noted, with Java requiring explicit type declarations unlike Python. Python's readability and English-like syntax were highlighted as advantages. C and Lisp, not object-oriented, used simpler array structures due to the problem's simplicity. Challenges in C, such as string comparison, were discussed. The report concludes with observations on the unique characteristics of Lisp and the overall testing and sanity checks performed across all languages to ensure program robustness.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
After completing the task in all four (Java, Python, Lisp and C) languages, we have come to the
following understanding of the different features provided by these languages and how those
features helped in program development.
In Java and Python, same features were used such as classes-objects (OOP), dynamic array
etc. In both these languages, two classes were developed, pizza and order, which were
imported into the main app file. As the dynamic arrays were used, there was no need to define
the array length before-hand. There are many differences between these languages. One such
difference encountered was the dynamic vs static style. In Java the variable type were properly
defined beforehand which was not needed in Python. It could be tedious in this problem but is
actually very helpful when working on larger project. Proper care were taken to properly use the
indentation in Python, even though indentation/white-spacing was used in all languages to make
the code readable. Python was found to be the easiest languages for this problem, where only
developing a Command Line Interface (CLI) was designed, as it is closest to writing program in
English language.
In C and Lisp, are not OOP based but no big issues were faced because of that considering the
complexity of problem. We could have used structures to store the data but again the problem
was very simple and simple arrays were used to solve the problem. In both of these, it was
assumed that the user will not order more than 10 pizzas in one order. Although we could have
asked the user beforehand for total number of pizza and then allocate the size to arrays or we
could have used malloc, realloc functions in C to handle the length of array. One problem faced
in C, was string comparison. Scanning a string and then comparing it was but difficult, could
have wrote helper functions to support that but found it much more easier to take integer inputs
from the user.
It is a common belief with programmers that in order to be good at programming, one should
know how to code in Lisp. Lisp is completely differently written in comparison to other three
languages. But once someone knows how to code in it, this problem was very simple to write in
Lisp as easy as writing in Python.
In terms of sanity checking and testing, a similar amount of effort was consumed in each
language to ensure robustness of program.
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
chevron_up_icon
1 out of 1
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]