Here is the correct Solution for Assignment No. 03 Semester: Spring 2021 Software Engineering-1 (CS504).
Note:
Please Don't copy and paste the assignment directly rename your file name and change font size and font style.
Question No. 1: (6 Marks)
Identify the
suitable design pattern for each real-world/example application.
Real-world/Example
Application |
Design Pattern |
Print
Spooler |
Singleton
pattern |
Oven’s
Preprogrammed Switches Interface |
Façade
pattern |
Weather
Alert App |
Observer
pattern |
Solution
Question No.
2: (4 Marks)
Identify the most appropriate architectural style for each example application system.
Solution:
Application Systems |
Architectural Styles |
Operating
System |
Layered
Architecture |
Compiler |
Data
Flow or Pipes and filters architecture |
Question No.
3: (10 Marks)
The following table contains some code statements in C++, which are not in the proper coding convention. Make the code statements self-documented by following the naming convention and best programming practices given in the course contents. Write your answer in the 2nd column of the table in the respective row.
Solution:
Code Statements without proper coding
conventions |
Code Statements with proper coding
conventions |
float sum = .25; //declaring a float variable |
float
sum = 0.25; |
string bookname; //declaring a string variable
for book name |
string
bookName; |
if (isEven) printEven(); //conditional statement |
If
(isEven) printEven(); |
floatValue = intValue |
floatValue
= (float) intValue; |
double speed = 0; //declaring a double variable |
double
speed = 0.0; |
0 Comments