
-
Re: CS508 GDB.1 Solution and Discussion
Total Marks 5
Starting Date Monday, February 15, 2021
Closing Date Tuesday, February 16, 2021
Status Open
Question Title GDB
Question Description
In a programming world, Lambda Expression (i.e. lambda function) is essentially a block of code that can be assigned to a variable, passed as an argument, or returned from a function call. It has been part of several programming languages like Smalltalk, Lisp, Ruby, Scala, Python, Java and C# etc. for quite some time.In context of C# programming, a lambda can be used instead of an anonymous method/function where we do not need to provide access modifier, return type and even name of the method. For example, the following anonymous method checks if a student is teenager or not:
Listing 1: (anonymous method in C# to check if a student is teenager or not)
delegate(Student std) {
return std.Age > 12 && std.Age < 20;
}
While the same functionality can be achieved by using lambda as;
Listing 2: (checking if a student is teenager or not using lambda in C#)
std => std.Age > 12 && std.Age < 20;
Here, we can see that the code has been shortened (i.e. writability increased). However, it makes the code relatively difficult to understand as “std” in listing 2 is ambiguous (i.e. readability decreased). But what about Reliability?
Being a programming language expert, you are required to compare both approaches (i.e. code written with/without lambda) and state which one is better in terms of Reliability in C# programming language.
-
Re: CS508 Assignment 3 Solution and Discussion Fall 2019
Assignment No. 03Semester Spring 2020
CS508- Modern Programming Languages
Total Marks: 20Due Date: July 27, 2020
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.Submission details
Following files must be submitted in a single zip or rar file.
• Code files(.java files)
• A .gif file which shows working of your application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.
If you do not submit any of the above mentioned file 50% marks per file will be deducted.
Objective
The objective of this assignment is to give students an idea on how to implement Multithreading with Synchronization concepts in JAVA.Lectures Covered: This assignment covers Lecture # 27-30
Problem Statement:
Main class Factorial Class having one method which will calculate factorial named printfactorial(). Thread1 class which extends from Thread Class Thread2 class which also extends from Thread Class
You are required to create a multithreaded console application in java having 4 classes which will calculate factorial of last 4 digits of your student id. These classes would be as follow:
Working:
Store last four digits of your student ID in a two separate classes. For example, if your ID is bc123456789 then store 67 in first Thread1 Class and 89 in Thread2 Class that will be passed to Factorial class later.
Thread1 class will pass 67 to the Factorial class and printfactorial() will print factorial of all the numbers from 1 to 67.
Thread2 class will pass 89to the Factorial class and printfactorial() will print factorial of all the numbers from 1 to 89.
You should use thread.sleep(10) after each calculation inside the loop.
As you know that you cannot store and print factorial of large numbers in simple integer or long type variables, so you are required to use BigInteger to store and print very long numbers.
printfactorial() method must be synchronized so that results of Thread1 is printed first then the result of Thread2 is calculated and printed.
Note: Proper exception handling code must be written where required. -
Re: CS508 Assignment 2 Solution and Discussion
Assignment No. 02
Semester Spring 2020
CS508- Modern Programming Languages
Total Marks: 20Due Date:12 June 2020
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.Submission details
Following files must be submitted in a single zip or rar file.
• Code file(.adb file)
• A .gif file which shows working of your application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.
If you do not submit any of the above mentioned file 50% marks per file will be deducted.
Objective
The objective of this assignment is to give students idea on how to implement object oriented concepts in ADA.Lectures Covered: This assignment covers Lecture # 13 – 17
You will develop Ada console application in GNAT IDE. You can also use any online compiler to compile Ada.
Problem Statement:
As you know that we cannot implement inheritance in Ada directly as there is no concept of class in Ada, we need to use a mix of tagged types and packages.
You are required to create a tagged type as person and then another as men, the tagged type men will inherit from person type.
The person type has following attributes:
• Name: String
• Age: Integer
• Gender: BooleanFunctions:
And also a function named print() [This function will print all three attributes of type person]
The tagged type men have following attributes
• Height: float
• ID: String
Functions:
This type will also have one function named print() which must print all the attributes of type men and person as well.
When application starts an instance of type men will be created and detail of men will be taken from user input and assigned to men type object after that the added details will be printed on the console screen. -
Download the Compiler from Link Extract the file snobol4.exe (e.g. I have extracted the file in desktop folder in my Z drive) Download the sample code file from TEST.SNO VU-LMS (It is simple text file you can view and edit in
notepad)TEST.sno Put the TEST.SNO in the same directory where snobol4.exe is Enter the following command SNOBOL4 TEST /q; you will see the output of the program if there is
no error.
-
Re: CS508 Assignment No. 01 Solution and Discussion
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
The assignment is submitted after due date.
The submitted assignment does not open or file is corrupt.
The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
Student ID is not mentioned in the assignment File or name of file is other than student ID.
The assignment is not submitted in .rar format.Submission details
Following files must be submitted in a single zip or rar file.
Code file(.sno file)
A .gif file which shows working of your application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.If you do not submit any of the above mentioned file 50% marks per file will be deducted.
Objective
The objective of this assignment is to give hands on practice on Snobol programming language.Lectures Covered: This assignment covers Lecture # 1 - 9
You are required to create a Snobol Console Program.
You will use Snobol4 Compiler to compile Snobol code, if you are using a 64-bit operating system then Snobol4 compiler will not work directly you need to use DOSBox to run the compiler and compiler code.(Tutorial document has already been uploaded on Lms on how to compile code in DOSBox).
Please note that you cannot use any online compiler.
Problem Statement:
You need to create a console application in Snobol which will execute nested loop based on your student id.
Last four digits of your id will be used in both loops.
For example, if your id is bc120401122 then outer loop will execute 11 times and inner loop will execute 22 times.
First print your id on top of the console screen.
Then inside both loops print no of times the loop has executed.
You can hardcode your id in your code or take input from user.
Make sure to write your id on top of the program otherwise your assignment will not be accepted. -
Re: CS508 GDB.1 Solution and Discussion
Question:
As you know C# and JAVA both are virtual machine based languages, Java’s virtual machine name is Java Virtual Machine (JVM) and C#.NET names it as Common Language Runtime (CLR).Compare both virtual machines to check which one is better than other, write at least two valid reasons in either case to support your answer.
Please share idea solution.
-
Quiz No 2 Total Questions : 10
Quiz will be based upon Multiple Choice Questions (MCQs). You have to attempt the quiz online. You can start attempting the quiz any time within given date(s) of a particular subject by clicking the link for Quiz in VULMS. Each question has a fixed time of 90 seconds. So you have to save your answer before 90 seconds. But due to unstable internet speeds, it is recommended that you should save your answer within 60 seconds. While attempting a question, keep an eye on the remaining time. Attempting quiz is unidirectional. Once you move forward to the next question, you can not go back to the previous one. Therefore before moving to the next question, make sure that you have selected the best option. DO NOT press Back Button / Backspace Button while attempting a question, otherwise you will lose that question. DO NOT refresh the page unnecessarily, specially when following messages appear Saving... Question Timeout: Now loading next question... Javascript MUST be enabled in your browser; otherwise you will not be able to attempt the quiz. If for any reason, you lose access to internet (like power failure or disconnection of internet), you will be able to attempt the quiz again from the question next to the last shown question. But remember that you have to complete the quiz before expiry of the deadline. If any student failed to attempt the quiz in given time then no re-take or offline quiz will be held.
Please read the following instructions carefully! -
Quiz No 3 Total Questions : 10
Please read the following instructions carefully!
Quiz will be based upon Multiple Choice Questions (MCQs).You have to attempt the quiz online. You can start attempting the quiz any time within given date(s) of a particular subject by clicking the link for Quiz in VULMS.
Each question has a fixed time of 90 seconds. So you have to save your answer before 90 seconds. But due to unstable internet speeds, it is recommended that you should save your answer within 60 seconds. While attempting a question, keep an eye on the remaining time.
Attempting quiz is unidirectional. Once you move forward to the next question, you can not go back to the previous one. Therefore before moving to the next question, make sure that you have selected the best option.
DO NOT press Back Button / Backspace Button while attempting a question, otherwise you will lose that question.
DO NOT refresh the page unnecessarily, specially when following messages appear
Saving…
Question Timeout: Now loading next question…Javascript MUST be enabled in your browser; otherwise you will not be able to attempt the quiz.
If for any reason, you lose access to internet (like power failure or disconnection of internet), you will be able to attempt the quiz again from the question next to the last shown question. But remember that you have to complete the quiz before expiry of the deadline.
If any student failed to attempt the quiz in given time then no re-take or offline quiz will be held.
Start Quiz
-
Assignment No. 03
Semester Fall 2019
CS508 - Modern Programming Languages
Total Marks: 20Due Date:16 January 2020
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student, handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.Submission details
Following Files Must be submitted in a single .zip or .rar file.
• Code file(s) .java file only
• A .gif file which shows working of your Application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
You are not required to submit the complete project, only copy these files from project folder. Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.
If you do not submit any of the above mentioned file 50% marks per file will be deducted.
Objective
The objective of this assignment is to give hands on practice on Java programming language.Lectures Covered: This assignment covers Lecture # 27 – 31
Problem Statement:
You are required to create a multithreaded java console application which will read a text file and write processed output in another text file.
Last Number in ID Character to calculate Last Number in ID Character to calculate 0 ! 5 & 1 @ 6 ( 2 # 7 ) 3 $ 8 _(Underscore) 4 % 9 =
• The program will be able to read the text file provided named input.txt using a separate thread.
• Calculate the number of characters in the file as per your student id.
• Last number of your student id is the character your program will calculate from the given list below.• Output the result on the screen.
• Create a new thread which will create an output file and store the result in that file.Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.
-
-
Assignment No. 02
Semester Fall 2019
CS508- Modern Programming Languages
Total Marks: 20Due Date:29 November 2019
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.Submission details
Following files must be submitted in a single zip or rar file.
• Code file(s)
• A .gif file which shows working of your application (For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
You are not required to submit the complete project, only copy these files from project folder. Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.
If you do not submit any of the above mentioned file 50% marks per file will be deducted.Objective
The objective of this assignment is to give hands on practice on Ada programming language.Lectures Covered: This assignment covers Lecture # 13 – 15
Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.
You are required to create an Ada Console Program using GNAT.
Problem Statement:
Create an Ada program which will read a text file and print all the data on the console.
• Create a text file named as StudentID.txt.
• Add Name, Student ID and semester in the text file.
• The program will print all the data line by line on the console.
• If the file is not found then appropriate error must be printed.
• If the file is found but no data exist inside the file then “no data inside file” must be printed.
Make sure to write your id on top of the program otherwise your assignment will not be accepted. -
Assignment No. 01 Semester Fall 2019
CS508- Modern Programming Languages Total Marks: 20Due Date: Tuesday, 12 November 2019.
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .doc or .docx format.
Uploading instructions
Your submission must include:
• Assignment should be in .doc or .docx format.
• Save your assignment with your ID (e.g. bx180200786.doc).
Assignment submission through email is NOT acceptable
Objective
The objective of this assignment is to learn how we can evaluate different programming languages based on syntax.
Note:
Your answer must follow the below given specifications.
• Font style: “Times New Roman”
• Font color: “Black”
• Font size: “12”
• Bold for heading only.
• Font in Italic is not allowed at all.
• Your answer should be precise and to the point, avoid irrelevant detail.Lectures Covered: This assignment covers Lecture # 01 – 07
Deadline
Your assignment must be uploaded/submitted at or before Tuesday, 12 November 2019.In this assignment we will evaluate 3 different languages on the basis of CPU time and Memory used for compilation.
3 languages we will be using are:
• Java
• C#
• C++
We will use nested loop which will execute finite number of times. For the sake of consistency, we will be using an online compiler of each language from the same website.
First you need to calculate the number of time both loops will run, for that we will use student id.
From the last 4 numbers of student id, first two characters will be number of times the outer loop will execute and last two characters will be number of times the inner loop will execute.
So, for example if student id is BC180201429 thenThe outer loop will execute 14 times and inner loop will execute 29 times.
Use the following compiler https://www.jdoodle.com/.Note down the CPU Time and memory Used for all the languages and fill the following table with CPU time memory and write the code for all 3 languages also take screen shots for each language and paste it in your solution file.
Language Code CPU Time Memory Used
You must write your student ID and language name in the code so it can be shown in the screen shot as attached below:
You are required to attach screen shots for all 3 languages showing output and resources used.
-
-
Assignment No. 03 Semester Spring 2019
CS508- Modern Programming LanguagesTotal Marks: 20
Due Date: July 31, 2019
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student, handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.
Uploading instructions
Your submission must include:
• Assignment should be in .rar format.
• Save your assignment with your ID (e.g. bx180200786.rar).
Objective
The objective of this assignment is to give hands on practice on Java programming language.Lectures Covered: This assignment covers Lecture # 27 – 33
Deadline
Your assignment must be uploaded/submitted at or before July 31, 2019.Problem Statement:
Make sure to write your id on top of the code file (As shown in the gif file) otherwise your assignment will not be accepted.
First the paragraph will be inserted. Next the user will be asked to input words. Words will be inserted all at once without any space between the words, and words will be comma separated (example shown in the gif file). The application will check each word in the given paragraph and will output success or frailer for each word on a separate line checking must be case sensitive.
Create a console application in java, where you will input a paragraph and also input some words and application will match all the words in the given paragraph to output success or failure for all words.
You can install NetBeans IDE or simple java Compiler to develop application.Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.
Submission details
Following Files Must be submitted in a single .zip or .rar file.
• Code file(s) .java file only
• A .gif file which shows working of your Application(For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
You are not required to submit the complete project, only copy these files from project folder. Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.If you do not submit any of the above mentioned file 50% marks per file will be deducted.
-
Please read the following instructions carefully!
Quiz will be based upon Multiple Choice Questions (MCQs).You have to attempt the quiz online. You can start attempting the quiz any time within given date(s) of a particular subject by clicking the link for Quiz in VULMS.
Each question has a fixed time of 90 seconds. So you have to save your answer before 90 seconds. But due to unstable internet speeds, it is recommended that you should save your answer within 60 seconds. While attempting a question, keep an eye on the remaining time.
Attempting quiz is unidirectional. Once you move forward to the next question, you can not go back to the previous one. Therefore before moving to the next question, make sure that you have selected the best option.
DO NOT press Back Button / Backspace Button while attempting a question, otherwise you will lose that question.
DO NOT refresh the page unnecessarily, specially when following messages appear
Saving…
Question Timeout: Now loading next question…Javascript MUST be enabled in your browser; otherwise you will not be able to attempt the quiz.
If for any reason, you lose access to internet (like power failure or disconnection of internet), you will be able to attempt the quiz again from the question next to the last shown question. But remember that you have to complete the quiz before expiry of the deadline.
If any student failed to attempt the quiz in given time then no re-take or offline quiz will be held.
-
Please share your current Quiz.
-
Assignment No. 02 Semester Spring 2019
CS508- Modern Programming LanguagesTotal Marks: 20
Due Date: May 31, 2019
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .rar format.
Uploading instructions
Your submission must include:
• Assignment should be in .rar format.
• Save your assignment with your ID (e.g. bx180200786.rar).
Assignment submission through email is NOT acceptable
Objective
The objective of this assignment is to give hands on practice on Ada programming language.Lectures Covered: This assignment covers Lecture # 13 – 15
Deadline
Your assignment must be uploaded/submitted at or before May 31, 2019.
You are required to create an Ada Console Program using GNAT.
Problem Statement:
Create an Ada program which will take Student Name, Student ID and CGPA then store it in file named studentdata.txt.
Ask the user to input name, id and CGPA one by one, and then write it in the file. Existing data must not be overwritten by current data, to accomplish this you can first read the file and store all the existing data and later on combine new and existing data and write into the file or you can use other methods to embed the new text.
• If file does not already exist then program must create new file.
• You need to record a gif file to show the working of your program.
• Do insert data of 2 students to show the proper working i.e. the data is not being overwritten.
Make sure to write your id on top of the program otherwise your assignment will not be accepted.Output.gif has been attached with this Assignment file please observe this file carefully your program’s output must be like this output file.
Submission details
Following Files Must be submitted in a single zip or rar file.
• Code file(s)
• A .gif file which shows working of your Application(For Recording .gif a software named Screentogif is uploaded on LMS, or you can use any other gif recording tool as well)
You are not required to submit the complete project, only copy these files from project folder. Please note if you submit doc or txt file you will be awarded 0 marks. Make sure to write your own VU ID in the assignment file(s) otherwise assignment will not be accepted.If you do not submit any of the above mentioned file 50% marks per file will be deducted.
Output GIF
-

Assignment No. 01 Semester Spring 2019
CS508- Modern Programming LanguagesTotal Marks: 20
Due Date: May 14, 2019
Instructions
Please read the following instructions carefully before solving & submitting assignment:
It should be clear that your assignment will not get any credit if:
• The assignment is submitted after due date.
• The submitted assignment does not open or file is corrupt.
• The assignment is completely or partially copied from (other student or ditto copied from handouts or internet).
• Student ID is not mentioned in the assignment File or name of file is other than student ID.
• The assignment is not submitted in .doc or .docx format.
Uploading instructions
Your submission must include:
• Assignment should be in .doc or .docx format.
• Save your assignment with your ID (e.g. bx180200786.doc).
Assignment submission through email is NOT acceptable
Objective
The objective of this assignment is to learn how we can evaluate different programming languages based on syntax.
Note:
Your answer must follow the below given specifications.
• Font style: “Times New Roman”
• Font color: “Black”
• Font size: “12”
• Bold for heading only.
• Font in Italic is not allowed at all.
• Your answer should be precise and to the point, avoid irrelevant detail.Lectures Covered: This assignment covers Lecture # 01 – 07
Deadline
Your assignment must be uploaded/submitted at or before May 14, 2019.Q1.(8 Marks)
SR NoLanguage Name
For loop Syntax
1
JAVA
for(int i=1;i<11;i++){ System.out.println(i); }2
Python
for x in range(1,11): print(x)3
Kotlin
for (i in 1..10) { println(i) }4
Swift
for i in 1...10 { print(i) }Given below is for loop syntax to ‘print 1 to 10 numbers’ in 4 different Programming languages:
You are required to calculate points of each language on the basis of following aspects:
Readability Reliability Cost/Programming effort
You have total 30 points for each language.10 points for each aspect based on your opinion.
Scale: 1 point lowest and 10 highest
Q2.(12 Marks):
Now explain each point according to winning language in each category for example if python has higher points in Readability then explain why this language has higher points in this section as compared to other languages given above. If there is a tie in 2 languages in the same category then explain both.
Note: Only consider the code of each language which is written above while calculating the points.
CS508 Quiz 2 Solution and Discussion
-
Enumeration type in C# may take any type of _______ in contrast to C++ where it take only _________
-
In C# the value type and reference type variable are inter convertible through ________ concept.
-
The concept of C# jagged array is similar in function to _________
-
_____is more strongly typed language then _________
-
In Java the ______________are not objects. All of the rest are objects, or any ___________ is called as object.
-
For event driven mechanism in C# we use _______ just like ____ in C++.

-
In C#, strings are _______
-
______compile initially to an intermediate. Which can be run by interpretation or just in time compilation or an appropriate virtual machine?
C++ and C#
C# and Java
Java and C++
Ada, C++
50% Off on Your FEE Join US!


