CS508 Assignment No 01 solution and Discussion - VULMS-Virtual University Of Pakistan

Some subjects are not on the menu, you can find by using the search box, for example "cs101"

Post Top Ad

CS508 Assignment No 01 solution and Discussion

CS508: Modern Programming Languages Assignment No 01 Graded Semester: Spring 2018 

Objectives: The objective of this assignment is to get familiar with: 
  1.  Languages evaluation criteria 
  2.  Evolution of FORTRAN and C++ programming languages 
  3.  Different criteria to consider when choosing a programming language for a specific domain 
  4.  Java Virtual Machine and its impact on memory management
Lectures Covered: This assignment covers lecture # 1 to lecture # 9

Question 1: [10 Marks]

FORTRAN is a general-purpose, imperative programming language, originally developed by IBM in the 1950s for scientific and engineering applications. FORTRAN is credited as the first compiled high-level language and the most widely used language of its time. Its versions spans about half a century, with continuous improvements and amendments.
C++, a general-purpose programming language, is evolved from C, ALGOL and SIMULA. It not only improves imperative features but also adds strong Object Oriented and generic programming constructs. One of the main reasons for its widespread popularity is that it is backward compatible with C. It is used in a wide variety of domains including desktop applications, embedded systems, and resource-constrained applications.
Suppose a Meteorological Department involves extensive numerical weather computations – its purpose is to give updated global weather data to other state departments and to manipulate this data for weather forecasting. In your opinion, which language, out of FORTRAN and C++, is most suitable for this purpose? Also justify your choice. 

[NOTE: Write your answer in concise bulleted / points form. Do not write un-necessarily lengthy paragraphs]

Question 2: [5 Marks] 

When you build a Java project/code, then it is not translated into machine language but in an intermediate form called Java bytecode. This bytecode is then passed to Java Virtual Machine (JVM). The interpreter in the JVM then starts compiling bytecode into machine code.
Briefly explain how Memory Management is done in Java Virtual Machine (JVM).

[NOTE: Write your answer in concise bulleted / points form. Do not write un-necessarily lengthy paragraphs]