We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>
+ Link For Assignments, GDBs & Online Quizzes Solution
+ Link For Past Papers, Solved MCQs, Short Notes & More
Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion
How to Add New Discussion in Study Group ? Step By Step Guide Click Here.
Assignment No. 04
Total Marks: 10
Due Date: 22/07/2013
Please read the following instructions carefully before submitting assignment:
To understand and familiarize with Java & C# Language.
For any query about the assignment, contact at firstname.lastname@example.org or through MDB.
Question # 1 Marks 5
Out of Java & C# which language is better according to you? Give three strong reasons to support your choice.
Question # 2 Marks 5
Let’s say a bank in Pakistan has 450 branches across Pakistan with banks headquarters in Islamabad. Bank wants to take its banking system to online. You have been chosen to make a system for this bank which language will you chose for this system and why. Keep your answer brief.
BEST OF LUCK
.+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)
Deal Alls start sharing information related to Assignment here????
Assalam u alaikum
bacho ye theory he hai is assignment mai aur kuch ni easy hai ye assignment to
koi to idea share krooooooooooo
specially 2nd question ka
You might have heard of the programming language called Java, since it has gotten a lot of press in recent years, perhaps more than any language ever. Much of this attention is unfortunately hype, but nevertheless, Java is a good programming language, and has many pedagogical advantages over other languages.
Sun was the company that introduced Java, and understandably it wanted to control its design and evolution. Unfortunately, Microsoft also wanted a piece of the action, and in particular wanted to change Java in certain ways that suited its needs. This situation became a legal nightmare, and eventually Microsoft decided that instead of trying to influence Java, it would simply design its own language, which is called C# (pronounced "C sharp"). This is the language that we will be using in CS-112. It is better than Java in certain ways, but is so similar in most ways that once you have learned how to program in C#, it will be trivial to transfer your knowledge to Java.
But it so happens that Java and C# are good general-purpose programming languages suitable for much more than just the Internet. They use many recent innovations in programming language design, yet are also simple enough to use in a course such as CS-112. Furthermore, once you know one programming language, it is much easier to learn another. Java and C# have many attractive characteristics, including:
|Simplicity. Their relative simplicity is their prime attraction as an introductory programming language.|
|Safety. Java and C# were designed to be robust. Their type systems are a major source of this robustness, and the absence of pointers removes one common source of problems. They also provide exception handling and other methods for creating programs that are less likely to crash.|
|Cost. Free implementations of both Java and C# are available.|
|Cross-platform. A Java program written for one platform, such as a PC or Mac, will run on any other Java platform automatically. Java programs are compiled into platform-independent byte-codes. C# is not quite as platform-independent, but should at least run under Windows and Mac OS-X (but not Linux).|
|Object-oriented. In Java and C#, (almost) everything is an object. In fact, there are no functions or procedures -- just class methods. C#'s treatment of objects is a bit more uniform than that of Java.|
|Client-Server and Network support. Java and C# applets are client-server programs that run on the Internet.|
|Multimedia support. The standard Java and C# libraries have support for graphic images, animation, and sound.|
|Ubiquitous. Java and C# applications are spreading throughout the Internet. Students learning these languages can find numerous examples, as well as employment opportunities.|
|Related to C/C++. Java and C# are perhaps 75% of C++, and vice versa. Students who already know C or C++ will have little difficulty learning Java or C#. Students who learn Java or C# first will have little difficulty picking up C or C++.|
It’s rare that people roll their own HTTP servers. Instead, C# programmers usually use IIS; Java programmers have a few choices, including TomCat. For my tests I’m going to utilize those two servers. For C#, I’m going to specifically use the ASP.NET MVC 4 platform running on IIS 8. I’m going to take two approaches: first, returning a string of HTML from the controller itself; for the second I’ll return a view that includes a date/time lookup.
For the Java tests, I can do two similar approaches. I can have a servlet return some HTML, or I can return the results of a JSP page. These are analogous to the C# controller and View approaches, respectively. I could use the newer Java Faces or any number of other frameworks; if you’re interested, you might try some tests against these other frameworks.
The C# controller simply returns a string of HTML. Running my client test for 2000 iterations sees a time of 991 milliseconds total. That’s still faster than my Java socket version.
The view version of the C# app creates a full standards-compliant HTML page, with an HTML element, head element, meta element, title element, body element, and an inner div element containing the text “The date and time is” followed by the full date and the full time. The date and time are retrieved through the DateTime.Now instance, and filled in dynamically with each request.
Running the client test for 2000 iterations against this view version takes 1804 milliseconds; about twice as long as the direct one. The direct one returns shorter HTML, but increasing the size of the HTML string to match the view version shows no difference; it hovers around the 950-1000 millisecond time. Even adding in the dynamic date and time doesn’t result any noticeable increase. The view version takes twice as long as the controller version, regardless.
Now let’s move on to Java. The servlet is just as simple as the controller in the C# version. It just returns a string that contains an HTML page. Retrieving 2000 instances takes 479 milliseconds. That’s roughly half the time as the C# controller—very fast indeed.
Returning a JSP page is also fast. As with C#, it takes a bit longer than the controller. In this case, retrieving 2000 copies takes 753 milliseconds. Adding in a call in the JSP file to retrieve the date makes no noticeable difference. In fact, the Tomcat server apparently performs some optimization, because after a few more requests, the time to retrieve 2000 copies went all the way down to 205 milliseconds.
These results are quite interesting. Having worked as a professional C# programmer for many years, I’ve been told anecdotally that .NET is one of the fastest runtimes around. Clearly these tests show otherwise. Of course, the tests are quite minimal; I didn’t do massive calculations, nor did I do any database lookups. Our space is limited here, but perhaps another day soon I can add in some database tests and report back. Meanwhile, Java is the clear winner here.
Question # 2 , PHP will be used ...
ub reasons khud search karo