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.
![]() |
Upload your Solution |

