Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

Question No. 1 [Marks 10]: 

You are given some literals (variable names, data type names, function names) in Column-1. Rewrite them in column-3 by following the standard C++ / JAVA coding conventions.

Note: Column-2 contains description of each literal (given in column-1) for your help.

Column-1 (Literals) Column-2 (Description) Column-3 (Re-Written after following standard JAVA coding conventions)
complexnumber “complexnumber” is a data type. Any variable of this type can be used to store a complex number.
monthlytaxrate “monthlytaxrate” is a variable used to store an employee’s monthly tax rate.
speed_of_light “speed_of_light” is a constant variable to store the speed of light.
void setstudentgrade() {

“setstudentgrade()” is function in student class.
address “address” is a private member of “Employee” class

Question No. 2 [Marks 10]

"Suppose you want to develop a Graphics library, you want that the client should be able to instantiate only one instance of the library class(s) at a time"

What design pattern you think, is most appropriate for implementing such type of library? Answer your question with solid reasons.

Views: 2292

Replies to This Discussion

Please discuss here about this assignment .thanks 

any one have idea about it...................?

1st question is very very very very very simple 

please then tell us what is simple........we have no idea of java....pls

akram ul haq ... dear just read the question again. the instructor wants to write the description provided in column b in C++ or Java coding convention. We have choice for selecting language; if you dont know about Java go for standard C++. For coding convention read the starting chapter of SE or Intro to programming course, you will know for your self. Like for example: take 1st item.

complexnumber |“complexnumber” is a data type. Any variable of this type can be used to store a complex number.|

this could be written in standard c++ coding convention as:

struct complexnumber


int real;

int imag;


As far as 2nd question is concerned, it is also quite simple: you have read about design patterns (i hope ). Just go through them again and find which design pattern is suitable for the desired condition given in the question. once you identified the pattern google for its pros & cons and little description.

Bus ya or help chahiye 

yes i need more help


plz tell w'd v hav to write the code like above in Column 3 or any description is to be written with it............plz cn u send the complete solution

Zaib-Un-Nisa What kind of help you need..? I guess i have made it quite clear & besides you still have 4 days to go +1 extended day to take up & materialize the idea. I'll try to upload any idea solution in the last days.

You have to write the code for question 01 using standard C++ or Java coding conventions: the sample of which is already given.

yup it is so simple....

Shukar hai... Kisi ko to samajh aya

CS504+ assignment#4 +solution+ fall2011

See the attached file please


See the attached file please



© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service