CS504 Assignment 3 Solution and Discussion
-
Assignment No. 03
Semester: Fall 2019
Software Engineering-1 (CS504)
Total Marks: 15Due Date: 21 January 2020
Instructions:
Please read the following instructions carefully before submitting assignment:
You should submit your assignment before or on due date on VULMS.
Your assignment should be your own work in your own words. It should not be copied from Internet, handouts or books.
Your Assignment must be in Microsoft Word document. Assignment in other than Microsoft Word document will not be accepted.
Assignment sent via Email will not be replied and accepted.
If the submitted assignment does not open or file is corrupt, it will not be marked and hence awarded zero marks.
Objectives:
• To improve the learning of students related to software and system architecture.
• To have hands on experience of writing self-documenting code following best programming practices.For any query about the assignment, contact at [email protected]
Total Questions : 03 Total Marks: 15
Question No. 1: (04)
A company wants to develop an image scanner and editor application for their office work which can be used on smartphones and PCs. This application will provide multiple functionalities like image capturing, image editing, printing and sharing. Image editing involves features like cropping, adjusting brightness/sharpness/contrast, and image rotation etc. All the features should work independently. A user will capture the image and can apply any of image transformations to improve the image quality. A user should be able to print the output image or share it using email services.
Currently, the software designers are assigned to develop the system architecture model for this application. By analyzing the above mentioned system features and various system models, suggest the most suitable architecture model for this application. Also justify your choice for the system model.Question No. 2: (04)
A software organization “CitrusBits” has developed an enterprise software architecture. The software architecture contains the blueprint and fundamental structure of the software system including all the software elements and relation among them. Being an enterprise architecture, the developed architecture is a complex one as it covers all the systems of the organization in which it is being deployed. In this architecture, the system’s overall responsibility is not distributed among its components which will make it difficult to maintain and extend the system in future.
Reading the above scenario which type of architecture technique will be best suitable for distributing the responsibilities to different subsystems which will help in maintaining the software system. Also justify your choice.Question No. 3: (07)
A programmer has written following piece of code for a class and it is not written according to the best programming practices.Code: class rightangletriangle{ constant int e = 3; // number of edges of the shape private: int a; // Length of Triangle height int b; // Length of triangle base public: float function1(){ // Method to calculate triangle area float z= (a*b)/2; // Formula for area calculation return z; } void function2(int x){ // method to set value for triangle height a = x; } void function3(int y){ // method to set value for triangle base b = x; } } ;
Write self-documenting code for the given class by following the naming conventions and best programming practices mentioned in the course contents.
Note: You need to only transform the given code to the self-documenting code. Don’t add any extra method or attribute in the solution code.
-
-
Q. 1 Answer:
Group client/server model
The most suitable architecture model for this application is groupware client/server model. Because groupware server model is providing a set of application that enable communication among clients using text and images.
Groupware are server based systems that support groups of people engaged in a common task and that provide an interface to a shared environment.
Groupware client/server model is that which supports multiple users working on related tasks in local and remote networks. Group server is evolving concept that is more than just multiuser software which allows access to the same data.
Groupware uses email, structured messages, agents , workflow, computer conferencing agents, file sharing systems among others. Groupware also makes problem-solving easier beacuse anyone in the team can make contributions.
By analyzing the above mentioned system features and various system models we can choose groupware based system model. Because groupware server models work like team group. In the above case a company wants to develop an image scanner and editor applications for their office work. Office work like a team work.
Ideas 2 Answer:
Reading the above scenario, we can choose partitioning architecture technique. Because partitioning technique is a best suitable technique for distributing the responsibilities to different subsystems which will help in maintaining the software system.
Partitioning can improve scalability, reduce contention, and optimize performance. It can also provide a mechanism for dividing data by usage pattern. For example, you can archive older data in cheaper data storage.
Partitioning of architecture is an important concept. What we basically want to do is distribute the responsibilities to different subsystems so that we get a software system which is easy to maintain. Partitioning results in a system that suffers from fewer side effects. This ultimately means that we get a system that is easier to test and extend and hence is easier to maintain. A partition that divides a ship or plane into compartments.
Screen. Partition consisting of a decorative frame or panel that serves to divide a space.
Wall. An architectural partition with a height and length greater than its thickness; used to divide or enclose an area or to support another structure. Therefore, we can use the partitioning technique in the above Scenario. It is easy to use and maintain the system.
Q. 2 Answer Idea
class rightangletriangle{ constant int e = 3; // number of edges of the shape private: int a; // Length of Triangle height int b; // Length of triangle base public: float function1(){ // Method to calculate triangle area float z= (a*b)/2; // Formula for area calculation return z; } void function2(int x){ // method to set value for triangle height a = x; } void function3(int y){ // method to set value for triangle base b = x; } } ; Solution: Class TriangleRightAngle { constant int TOTAL_EDGES = ; private: int heightLengthMaximum; int baseLengthMaximum; public: float triangle AreaCalculate() { float wholeArea = (a*b)/2; return wholeArea; } void heightSetTriangle (int providedUserHeight){ heightLengthMaximum = providedUserheight; } void heightSetTriangle (int providedUserHeight){ baseLengthMaximum = providedUserbase; } };