https://www.google.com/contributor/welcome/?utm_source=publisher&utm_medium=banner&utm_campaign=2376261057261409

Search This Blog

Search with our Site

Custom Search

Thursday, January 12, 2012

CS508 Modern Programming Languages Assignment No-4 Fall 2011


Assignment Q:
Q#1: Suppose there is a java program with 2 packages named FirstPackage and SecondPackage. FirstPackage contains 2 classes named FFirstClass (with package access level) and FSecondClass (with public access level). SecondPackage contains a class named SFirstClass with public access level. Write down the code to declare the objects of classes FFirstClass and FSecondClass within the class SFirstClass if it does not generate compiler error. [5]
Q#2: Consider the following java code segment: [5]
class ABC
{
public void FirstFun(int a, int b)
{ ….. }
public void SecondFun(int a, int b)
{ ….. }
public void ThirdFun(int a, int b)
{ ….. } }
class XYZ extends class ABC
{ public void FirstFun(int a, int b, int c)
{ ….. }
public void ThirdFun(int a, int b)
{ ….. } }
You have to write about each of the three super-class methods whether they are inherited, overloaded or overridden in the sub-class. Give reasons to support your answer.
Q#3: How to declare alphanumeric atoms in PROLOG; Give two examples of then w.r.t to PROLOG syntax. [5]


Read more: Assignment No-4 Fall 2011 - Virtual University of Pakistan http://vustudents.ning.com/group/cs508modernprogramminglanguages/forum/topics/assignment-no-4-fall-2011#ixzz1jK4N9XlD

No comments:

Post a Comment