Can include JEE software engineering

Software engineering questions and answers

Transcript

1 Foreword Software Engineering Questions and Answers We would like to take this opportunity to thank everyone who worked on this hopefully useful summary! I just want to explain some of the subtleties of the document: Why are some words or sentences shown in red? If something is marked in red, it only means that it may not be a suitable translation, or that the content needs some interpretation. And in pink letters? This color defines comments that belong in the body of the text or simply comments by the author that can be important for understanding. What is the gray font about? These passages of text may be unimportant because they either go into great detail or answer more than what is specified in the question. Danger! These deposits should be treated with caution. Better to learn too much than too little! Ivan Antes-Klobucar / ITM11 1

2 Table of Contents Foreword Why are some words or sentences shown in red? And with pink writing? What is the gray font about? Contents Chapter 1 Introduction to Software Engineering Why is the traditional engineering metaphor of civil engineering and software development only partially applicable? What special characteristics does a cross functional team have? What is software engineering? What is software? What is the difference between software engineering and computer science? What is a system What is the difference between software engineering and systems engineering? What is software process? In which areas is appropriate behavior part of the day-to-day work of a software engineer? What is a socio-technical system (describe an example)? What is a legacy system (describe an example)? What is a critical system (describe an example)? What is cloud computing (describe an example)? Do you describe the challenges in software engineering? What is the No Silver Bullet in the context of software engineering? Can you describe three possible approaches to increase the efficiency in software development? Chapter 2 - Requirements Engineering What is Requirements Engineering? Describe the two levels of requirements, for which reader groups are these levels intended? Do you describe the classification of the system requirements? (Whole question) What is a requirements document? What is a stakeholder? What should you watch out for when defining non-functional requirements? What are domain requirements? How does the requirements engineering process differ in conventional and agile project methodology? What is a feasibility study? Do you sketch and explain the requirements engineering process? Which tests should a requirements document be subjected to? What is requirements management? Chapter 3 Architecture & Design What is Software Design? Explain three advantages of a design document. Describe five non-functional requirements that are important for choosing the right software architecture. What is a pattern? Outline and explain the repository model, what are the pros and cons? Outline and explain the client-server model, what are the advantages and disadvantages? Sketch and explain the layered model, what are the advantages and disadvantages? Describe the presented modular decomposition styles. Describe the presented control styles. Name five smells of decaying software. Ivan Antes-Klobucar / ITM11 2

3 What is a Distributed Multitiered Application in the context of JEE (sketch and explanation)? Which client types are supported by the JEE architecture (sketch and explanation)? Chapter 4 - Implementation What is the implementation of a software system? Describe three possible forms of abstraction used by programming languages. What do programming languages ​​use the concept of strong typing for? Which 5 concepts characterize object-oriented programming languages? What is the concept of exceptions used for in programming languages? What is the term concurrency? Explain the term visual programming. Do they explain domain-specific languages ​​(DSLs)? Describe the difference between system and scripting languages. What special properties do functional programming languages ​​have? Name some of the most famous representatives of functional programming languages. What is configuration management? What are the special features of host-target development? What is Open Source Development? Which license conditions do you know from the field of open source licensing, and what are their special features? Chapter 5 - Verification & Validation Explain the terms verification and validation. Describe the two approaches to the verification and validation of software systems. Explain the technology of software inspection, its advantages and the possibilities of automation. Explain the technology of software testing, its goals and the possibilities of automation. Explain the difference between defect and validation testing. In which three phases can software testing of commercial software be divided and what are the characteristics of these phases? What are the differences between Unit Testing, Component (Interface) Testing and System Testing? Describe the division of the different types of tests. Explain the term component testing. Describe the four phases of a test sequence. Explain the terms SUT, DOC and Test Double. Compare integration testing and unit / component tests (sketch) and explain the advantages and disadvantages of both approaches. What is Test-Driven Development (TDD)? Explain how TDD works. What types of user testing are there and how do they differ? What is test case design and which approaches are used (explanation)? Chapter 6 - Software Evolution Explain the basic concept of software evolution. Describe the different types of software maintenance. Compare the costs of software development and maintenance (explanation). Explain the differences between software development and maintenance. Explain the term system re-engineering and what are the advantages compared to a new implementation. Describe the software re-engineering activities. Describe the different strategies involved in legacy system evolution. Chapter 7 - Software Process Models Describe the Waterfall Model (sketch and explanation) as well as the advantages and disadvantages. Ivan Antes-Klobucar / ITM11 3

4 Describe the incremental delivery model (sketch and explanation) and the advantages and disadvantages. Describe the Component-Based Development Model (sketch and explanation) and the advantages and disadvantages. Explain the manifest for agile software development and give two examples of agile process models. Explain the meaning of the four variables in project management. Which variable is actively influenced in XP (why)? How can the Cost of Change curve be kept flat (sketch and explanation). Describe the different XP practices. Describe the Scrum Flow (sketch and explanation). Describe the different Scrum roles (tasks and activities). Describe the different Scrum Meetings (when do they take place and what is their purpose). State the main characteristics of Kanban. What are some of the differences between Kanban and Scrum? Chapter 8 - Unified Modeling Language What is UML? How are the diagram types structured? Name 5 of the most important UML diagram types. In which areas can UML be used sensibly? Draw a class diagram for a Book class that holds one or more Page class objects as references. Chapter 9 - Appendix Ad Chapter 2 - What is a Stakeholder? Ad Chapter 2 - What should be considered when defining non-functional requirements? Ad Chapter 5 - Describe the subdivision of the different types of tests. Ivan Antes-Klobucar / ITM11 4

5 Chapter 1 Introduction to Software Engineering Why is the traditional engineering metaphor of civil engineering and software development only partially applicable? In software engineering, the effort to create documentation (source code) is much higher than, for example, drawing a blueprint for a building. In software development, the actual construction process takes place at the push of a button and without human intervention, while a building has to be built long and hard by several people. What special characteristics does a cross functional team have? A so-called cross-functional team consists not only of people who are experts in a field, but are also involved in several sub-areas of the development process. Programmers are not only responsible for writing source code, they also have to test and design some of it. The development teams not only take care that the software is created, but also partly take care of analysis and marketing. This loosens up the traditional waterfall system and makes it more dynamic. What is software engineering? SE is an engineering discipline that deals with the production of software and thus covers all phases of the development process, from requirements engineering to maintenance of the system after it has gone into operation. An engineering discipline is the ability and art from science, mathematics, society and the market to build devices, buildings or systems that are used to improve people's quality of life. What is software? A computer program with the accompanying documentation. Software products can be designed for individual customers or for a specific market. What is the difference between software engineering and computer science? CS deals with basics and theory. SE deals with possibilities to put the knowledge gained from CS into practice and to produce usable software. What is a system? A system is a sensible combination of different, interdependent components that work together to solve a problem or to accomplish a task. Ivan Antes-Klobucar / ITM11 5

6 What is the difference between software engineering and systems engineering? System engineering deals with all aspects of system development (computer systems), from hardware and software to process engineering. Software engineering is part of this process. What is software process? A collection of activities whose goal is the development or enhancement of software. In which areas is appropriate behavior part of the day-to-day work of a software engineer? Confidentiality You should always observe the confidentiality of your customers and employers, regardless of whether they have signed a confidentiality consent or not. Competence You should never misrepresent your level of competence and consciously accept assignments that are beyond your abilities. Intellectual Property Rights You should be aware of local law, especially when it comes to copyrights and patents. Computer Abuse You should never misuse your knowledge for harmful purposes, whether you are playing a game on a colleague's machine or knowingly distributing malware or viruses. What is a socio-technical system (describe an example)? A very broad system that consists of technical and non-technical components. They have defined operational processes that usually involve people. The characteristics of an ST system are: High complexity: It is practically impossible to understand the whole system. They have properties that are only just coming about and belong to the whole system, e.g. Addiction. Non-deterministic: Given specific input, they may not produce the same output. The behavior of the system depends on human operators. An example would be a hospital infrastructure. People with different qualifications (doctors, nurses, helpers) enter data into the system and other people produce results from it (reports, medical files, referrals, etc ...) Ivan Antes-Klobucar / ITM11 6

7 What is a legacy system (describe an example)? LS are Socio-Technische computer-based systems that were developed in the past using old or outdated technology. They are often business-critical systems that continue to be serviced because replacing them with a new system would be too risky. Such systems have a very long service life (several years up to decades). An example would be Microsoft Windows XP and Internet Explorer 6.0. Many internal company applications only run in this browser. What is a critical system (describe an example)? CS are systems in which a system failure poses serious economic, physical or human risks. Sub-areas are: Safety-critical systems: Systems in which errors can result in human life or severe environmental pollution. Mission-critical systems: Systems in which an error can cause a targeted activity (mission) to fail. Business-critical systems: Systems in which errors can mean high costs for a company. Examples: Safety-critical: life support systems in hospitals, aircraft control computers Mission-critical: space flight control systems Business-critical: online payment systems What is meant by cloud computing (describe an example)? A new IT trend in which computing and data storage is being outsourced from desktop and portable computers to large computing and data centers. Computer architectures should apply Moore's law of increasing computing power to the number of processor cores and threads per chip. The industry as well as academies have to design systems and services that exploit a high degree of parallelization. Software architecture for massive parallel and data intensive tasks will gain popularity. The data is stored and processed at geographically distant points. The data centers should therefore respect and maintain the integrity and privacy of the users. The computing power must be elastic and be able to adapt quickly to requirements. Example: Dropbox (save data on the Internet and access it on any device), Google Services (edit documents, manage appointments, etc ...) Ivan Antes-Klobucar / ITM11 7

8 Do you describe the challenges in software engineering? Complexity: Software entities are much more complex for their size than any other human construct. No part is like the other, above the statement level. The job of the DevTeam is to create an illusion of simplicity. Scaling a software does not mean increasing the size, but expanding the range of functions. In most cases, elements do not interact linearly with one another. This complexity also gives rise to management problems. Conformity: Software must be adaptable because it is perceived as such. It must be compatible with other user interfaces. It is not enough to redesign the software itself. Modifiability: Software can and must be easily modified. It is integrated into a system of applications, users, rights and machine vehicles that change and so the software must also be changed. Invisibility: Software is invisible and cannot be visualized. It is not part of the room. As soon as we try to represent software, we get a diagram of a chaotic structure, which overlaps into each other. The individual graphs of the diagram symbolize the control and data flow, dependency patterns, temporal sequences, etc ... What is meant by No Silver Bullet in the context of software engineering? There is no technological breakthrough that will produce magical results, but there is a promise of continued progress. Can you describe three possible approaches to increase the efficiency in software development? Buy vs build: Software for specific purposes is often cheaper to buy than it is to produce. The more users a software has, the lower the per capita costs, since the software costs a lot to produce, but hardly any distribution. Refining the requirements and rapid prototyping: the customer doesn't know what he wants. Therefore, the most important task of the software engineer is to find out exactly what the software requirements are and to know what exactly you want to manufacture. Software is not built, it grows. Great Designers: Software design is a creative process, so the main reason that good software is made is the people who work on it. The difference between a normal and a great designer is a power of ten. 1 1 See: Schwarzl Patrick, SE_Kontrollfragen.pdf, ITM09 Ivan Antes-Klobucar / ITM11 8

9 Chapter 2 - Requirements Engineering What is Requirements Engineering? The requirements for a system are specified. These include the desired properties, restrictions on system operations and the software development process. RE is the communication between customers, users and developers. It is not a purely technical process, as the requirements are influenced by user preferences, dislikes and prejudices, as well as political and organizational aspects.Specification: If a company wants to commission a software project, it has to formulate its software requirements abstractly enough without specifying the solution for it (solution-less requirements). The whole thing needs to be written down so that several parties to the contract can bring their own ideas and suggestions to refine the specifications of the system. Specification: As soon as the specification is ready, the representative must write a more detailed system definition for the customer so that he or she understands the software and can understand and validate its function. Describe the two levels of requirements, for which reader groups are these levels intended? User requirements: Are natural language statements with diagrams describing what services the system will perform and the constraints under which it will function. Readers groups: System users, managers of customers / agents, system architects. System requirements: These are precise explanations of the functions, services and restrictions of the system. The system requirements should define exactly what is being implemented, as they can possibly be part of the contract between the customer and the developer. Readers' groups: system architects, software developers Do you describe the classification of the system requirements? (Whole question) Functional requirements: Statements of services that the system offers, how it handles inputs and how it behaves in different situations. The functional requirements also state what the system should not do. Non-functional requirements: Are the limitations of the services that the system offers, such as time restrictions, or the development and standards. Domain Requirements: Requirements of the domain directly. They determine the behavior and restrictions of the system and thus the functional or non-functional requirements. Problem with this: software engineers may not understand the characteristics of the domain and often cannot tell whether a domain requirement has been left out or is in conflict with others. Ivan Antes-Klobucar / ITM11 9

10 What is a requirements document? The RD or Software Requirements Specification (SRS) is the official specification of what the system developer should implement. Due to the diversity of the different users and readers, the document must be a compromise between: Make the requirements understandable to the customer Explain the requirements precisely and in detail for developers and testers, and contain information about possible system developments. What is a stakeholder? A person or a company who is involved in the project in any way, be it client or user. 2 What should be considered when defining non-functional requirements? A common problem when defining non-functional requirements is that users often encourage these requirements as general goals, such as ease of use, easy configuration, or fast response times. Example: The system should be easy to use for medical staff and organized in such a way that user errors are minimized as much as possible. Better: After four hours of training, medical staff should be able to operate the program with all of its functions. After training, the average number of mistakes per hour by experienced users should not exceed two. Speed ​​Number of processes carried out / second Update time Response time Size Physical size (Mbytes) Number of processors required Simplicity of learning time Number of assistance Robustness Time to start up after an error Number of events that cause errors Probability of data loss in the event of an error 2 Cf. Ivan Antes-Klobucar / ITM11 10

11 What are domain requirements? Are the requirements for the system that originate from the respective domain (examples: legal domain, commercial domain, material processing, commercial domain, etc ...) and reflect the characteristics and limitations of those. They can be functional or non-functional requirements. Software engineers do not always understand the characteristics of each domain and often cannot accurately tell whether or not a domain requirement has been met. How does the requirements engineering process differ in conventional and agile project methodology? Traditional (conventional) approach: For larger projects, there is a clearly identifiable requirements engineering phase before implementation. Agile approach: Requirements are determined dynamically during the development of the system. What is a feasibility study? An assessment of whether the system is useful and useful for the business. The results of the feasibility study should indicate whether it makes sense to move the project forward or not. The results should be: Does the system contribute to the purpose of the organization? Can the system be implemented on time and within budget using the latest technology? Can the system be integrated and combined with other systems in use? If the answer to these questions is no, then the system has no business value. Ivan Antes-Klobucar / ITM11 11

12 Do you sketch and explain the requirements engineering process? 1. Discovery of the requirements: Interacting with stakeholders to find out their requirements. 2. Classification and organization: Organize unstructured collections into related groups (clusters). 3. Prioritization and negotiation: Resolve conflicting requirements from several stakeholders. 4. Specification: Produce formal or non-formal system models. Which tests should a requirements document be subjected to? 1. Use short sentences 2. Never more than one requirement per sentence 3. Avoid jargon, abbreviations and acronyms 4. Use short paragraphs 5. Use lists and tables where possible 6. Use consistent terminology 7. Words as should, should and must use regularly 8. Do not use nested conditional clauses 9. Write actively instead of passively 10. Do not express complex relationships in natural language 11. Do not use anonymous references 12. Pay attention to spelling and grammar What does requirements management mean? RM is understanding and controlling changes in system requirements. In addition, new requirements that arise must be met. Ivan Antes-Klobucar / ITM11 12

13 Chapter 3 Architecture & Design What is Software Design? The essence of software design is to make decisions about the logical organization of software systems. Explain three advantages of a design document. Stakeholder communication: The architecture is a high-quality presentation of the system that can serve as a basis for discussion for various stakeholders. System analysis: Making a system architecture explicit requires some analysis. Architecture decisions have a major impact on whether the system can even meet the critical requirements such as performance, reliability and maintainability. Widespread reusability: System architectures are compact descriptions of the organization of a system and how its components operate with one another. They are often the same for systems with similar requirements. Describe five non-functional requirements that are important for choosing the right software architecture. Performance: The architecture should be designed in such a way that critical operations are localized in a small number of sub-systems that have as little communication as possible with one another. (Large-grain vs. fine-grain components) Security: A layer structure should be used for the architecture in which the most critical parts in the innermost layers should be protected. These innermost layers should be validated for security at the highest level. Safety: The architecture should be designed in such a way that safety-relevant operations are localized either in a single subsystem or in a small number of subsystems. This reduces the costs and problems of safety validation. Availability: The architecture should be designed in such a way that it contains redundant components, so that it is possible to replace or expand parts without having to stop the system. Maintainability: The system architecture should contain fine-grain components that are self-contained so that they can be easily exchanged. What is a pattern? Patterns are used to present, share and reuse knowledge about software systems. They are essentially stylized, abstract descriptions of best practices that have been checked and tested on various systems. Ivan Antes-Klobucar / ITM11 13

14 Outline and explain the repository model, what are the pros and cons? All data is managed in a central repository. Components do not interact directly with each other, only through the repository. Advantages: Efficiently share large amounts of data. No need to transfer data directly between the sub-systems. Components are independent. Data can be managed uniformly. The distribution interface is visible through the repository schema. It also develops new tools. Disadvantages Errors in the repository affect the entire system. Communication is inefficient through the repository. Sub-systems must be compatible with the repository. Further development is difficult because large amounts of information are generated by the data model. Ivan Antes-Klobucar / ITM11 14

15 Outline and explain the client-server model, what are the advantages and disadvantages? The functionality is organized in services, with each service being provided by a separate server. Pros: Servers can be scattered across the network It is easy to integrate new servers and add them to the system or upgrade servers without affecting other parts of the system Disadvantages Each service is a single point of failure that is prone to denial of service) or server failure. Ivan Antes-Klobucar / ITM11 15

16 Sketch and explain the layered model, what are the advantages and disadvantages? The system is organized in layers. Each layer has its own functionality. Advantages: Easier multi-platform implementations. Easy replacement of entire layers as long as the interfaces are retained. Redundant facilities can be provided in each layer in order to increase the reliability of the system. Cons: Offering clear separation between layers can be difficult as higher layers may need to interact directly with layers that are not immediately below them. Because of the many levels of interpretation of a system query, performance can be a problem. Ivan Antes-Klobucar / ITM11 16

17 Describe the presented Modular Decomposition Styles. Sub-system decomposition: After a system organization has been decided, the sub-systems must be broken down into modules. A common method is object-oriented decomposition, in which the system is broken down into objects that communicate with one another. An object-oriented model structures the system into a set of loosely connected objects with clearly defined interfaces. Objects call the services of other objects. Object decomposition deals with object classes, their attributes and operations. Objects are often representations of things from the real world so that the structure is easy to understand. Describe the presented control styles. Centralized control: A component calls services from other components in the system (reflects the method / procedure / subroutine calls in programming languages). A system acts as a system controller and is responsible for the management and execution of other components. Call-return model: Control begins at the top of a subroutine hierarchy and runs through the lower levels of the tree. This model is only applicable to sequential systems. Manager model: A manager controls the starting, stopping and coordination of other processes. A process is a component or module that can run in parallel with other processes. This model can be applied to concurrent systems (event-loop model). Event-based control: The system responds to asynchronous events that either come from subsystems or other components in the system environment. Event-driven control models are controlled by externally generated events. The difference between an event and simple input is that the timing of the event is beyond the control of the process that is supposed to handle the event. Broadcast model: An event is sent to all components. Any component programmed to handle the event can respond to it. This model is effective for integrating components that are distributed over many computers in a network. Interrupt-driven model: This model is used in real-time systems in which external interrupts are detected by an interrupt handler. These are passed on to another component that processes them. Ivan Antes-Klobucar / ITM11 17th

18 Name five smells of rotting software. Rigidity: Difficult to change Fragility: Breaks in many places after a single change Immobility: Contains useful parts that can only be separated with great effort and risk. Needless Complexity: Software contains elements that are not currently useful. Opacity: Difficult to understand. Needless Repetition: Frequent cut & paste. Viscosity of software - High when methods that preserve the design are more difficult than hacks. Viscosity of environment - High when the development environment is slow and inefficient. What is a Distributed Multitiered Application in the context of JEE (sketch and explanation)? The various applications that make up a Java EE application are installed on different devices, depending on the level in the multi-level Java EE environment to which the application component belongs. Java EE applications are generally seen as 3-stage applications because they are distributed over 3 locations: client computer, the Java EE server machine and the database or legacy machines in the backend. Which client types are supported by the JEE architecture (sketch and Ivan Antes-Klobucar / ITM11 18

19 explanation)? Web Client A web client is a thin client that usually does not make any database queries, does not execute complex business rules, or connects to legacy applications. Such heavyweight operations are dumped on enterprise beans that are executed on the Java EE server. A web client is made up of two parts: Dynamic web sites that contain various types of markup language generated by web components that run in the web stage. Web browsers that display the pages that are received from the server. Applets A web site received from the web stage can contain an embedded applet. An applet is a small client application that is written in Java and is executed on the Java virtual machine in the web browser. Application clients An application client runs on the client machine and provides a means for users to handle tasks that require a more extensive interface than can be offered with markup languages. Application clients access enterprise beans directly, which run in the business level. Ivan Antes-Klobucar / ITM11 19th

20 Chapter 4 - Implementation What is the implementation of a software system? Implementation is the transformation of a design model into executable code. To carry out this software development step, it is essential to select the correct programming language (s) as the implementation vehicle. The selected programming language must give the application programmer the power to express the task in a disciplined manner. Thousands of programming languages ​​have been designed to meet the requirements of each application area. Much has been developed for research purposes only and others for production use. Some languages ​​are general-purpose, while others are designed for specific domains. Some of the most widely used programming languages ​​are: C C ++ Java Perl Visual Basic Python C # Describe three possible forms of abstraction used by programming languages. Control abstraction: Control abstraction describes a clearly defined operation that represents execution sequences of statements (actions) in the program and includes intraprocedural control structures such as if-then-else, while and switch statements. Procedural abstraction: Procedural abstraction deals with breaking down a program into units that typically have special purposes. PA includes the definition of an interface and implementation of the unit. Units are made up of local data and code that is able to access non-local data. By hiding the implementation you are better able to change the implementation. This raised the idea of ​​information hiding. Data abstraction: Abstract data types give programmers the opportunity to safely define their own data types. Modern concepts of abstract data types include: encapsulating or enclosing the data and the operations involved. Name the data type. Put restrictions on the operators. Rules that specify the visibility of the data. Separate specification from implementation.What do programming languages ​​use the concept of strong typing for? Ivan Antes-Klobucar / ITM11 20

21 Strong typing is currently accepted as a fundamental feature of modern programming languages, regardless of whether through compile time or runtime checks. Strong typing ensures the reliability of code and offers an additional layer to check a program semantically. As generic and polymorphic typed systems developed for programming languages, they became directly related to the topic of software reuse. Which 5 concepts characterize object-oriented programming languages? Abstraction An abstraction identifies the essential characteristics of an object that distinguishes it from all other types of objects. In this way, it provides clearly defined conceptual boundaries that relate to the viewer's perspective. Implementations: Class, Interface, Constructor / Destructor Encapsulation Encapsulation is the process of bounding elements of an abstraction that represents their structure and behavior. Implementations: Internal Data / Operations, Access Modifiers Modularity Modularity is the property of a system that has been broken down into a collection of related and loosely connected modules. Implementations: Package, Class + Interface Hierarchy Hierarchy is a series or arrangement of abstractions. The two most important hierarchies in a complex system are: its class structure (is a hierarchy) its object structure (part of hierarchy) Implementations: single inheritance, multiple inheritance, aggregation, composition Typing Typing is the enforcement of a class of an object so that objects of other types cannot be exchanged, or at best in very strictly restricted ways. Implementations: class, dynamic / static typing, polymorphism What is the concept of exceptions used for in programming languages? Exceptions are features built into programming languages ​​to give the programmer the ability to specify what to do if unusual conditions / situations arise during execution. Statements are executed in a try-block, which is associated with a catch-block, which handles the exceptions that can be thrown. Exceptions are processed locally or in the first suitable typed handler in the call chain. The collection of exceptions that can be thrown directly or indirectly by a function can be listed as part of the function declaration. What is the term concurrency? The initial simultaneity construct was a co-routine, which allowed the quasi-parallel execution of a program. Dijkstra showed how to use semaphores to solve a variety of synchronization problems. Ivan Antes-Klobucar / ITM11 21

22 A monitor is an object or module that is intended for safe use in more than one process / thread. Its methods are executed with mutual exclusion, so at most one thread is executing one of its methods at any given time. Java has expanded the monitor concept by encapsulating access to shared data using synchronized methods and code blocks. Dijkstra's eating philosophers Five silent philosophers sit at a round table in front of a plate of spaghetti. There is a fork next to each plate. Every philosopher has to think and eat alternately. A philosopher can only eat if he holds a fork left and right. Any philosopher can pick up a neighboring fork when it is available and put it down again. These are separate actions: forks must be picked up and put down with individual actions. The problem lies in designing behavior so that none of the philosophers starves to death, i.e. can permanently alternate between thinking and eating. Explain the term visual programming. The goal of visual programming is to reduce the cognitive burden on human programmers by means of devices that reduce the mental effort required to understand the available information and make sense of it. Visual programming refers to any system that allows a program to be specified in two or more dimensions. Many of these systems had advantages that were exciting and intuitive to demonstrate with toy programs, but got into difficult problems when trying to expand them into realistically-sized programs. Visual programming moved in two directions: Visual programming through programming environments. This direction involves incorporating visual expressions into integrated programming language environments for the specific parts of development where visual expressions brought obvious benefits to human programmers. Domain-Specific Visual Programming Languages ​​Because many domain-specific languages ​​were targeted at specific audiences, as well as the specific applications, these researchers began to focus more on the target groups for which these programming languages ​​were intended (end-user programming). Ivan Antes-Klobucar / ITM11 22

23 Do you explain domain-specific languages ​​(DSLs)? A domain-specific language is a programming language or specification language that is specifically intended to handle a particular problem domain, problem representation technique, and / or a particular solution technique. Examples of DSLs: DSLs from technical domains: HTML, Logo, SQL, etc. DSLs from professional domains: To describe telephone bills, insurance contracts, state machines in embedded systems, etc. Standard editors are used to modify the DSL program (concept of lines , Cut & Paste, etc.) Example: Xtext Eclipse Modeling Framework Creates parser, class model from AST, enhances text editor (code completion, syntax highlighting, etc.) Project planning concepts The code is visually preserved in AST at all times Different editors change the AST (mix from graphical and text-based editors) There is no need for code parsing. This makes it easy to embed one language in another Example: MPS from JetBrains When creating a language, the rules for code editing and rendering, as well as the language type system and restrictions are defined. MPS generates Java, XML or HTML code Ivan Antes-Klobucar / ITM11 23

24 Describe the difference between system and scripting languages. In software development there has always been a discussion about whether to use system programming languages ​​such as C, C ++ or Java, or script languages ​​such as Python, Perl and Tcl. System programming languages ​​were designed to build data structures and algorithms from scratch, starting with the most primitive computer elements such as words of memory. Script languages ​​are designed to stick: they assume the existence of powerful components and are only designed to connect them. System programming languages ​​have been introduced as alternatives to assembly languages. System programming languages ​​differ from assembly languages ​​in two ways. They are high-level and strictly typed: The term Higher Level means that many details are processed automatically so that programmers can write less code to do the same work. In a strictly typed language, the programmer defines how each piece of information is used and the language prevents it from being used in any other way. Scripting languages ​​assume that a collection of useful components already exist in other languages. Scripting languages ​​are sometimes referred to as glue languages ​​or system integration languages. They allow fast development of adhesive-oriented applications. To make it easier to connect multiple components, scripting languages ​​tend to be typeless. Scripting languages ​​are often string-oriented (providing a consistent representation of many different things). Scripting languages ​​are usually interpreted while system programming languages ​​are being compiled. Scripting languages ​​are less efficient than system programming languages. A typical statement in a scripting language executes hundreds or thousands of machine instructions, while a typical statement in a system programming language executes around five machine instructions. A scripting language is not a substitute for a system programming language and vice versa. Ivan Antes-Klobucar / ITM11 24

25 What special properties do functional programming languages ​​have? Functional programming is a paradigm (prime example) that treats computation as the evaluation of mathematical functions and avoids static and variable data. In practice, the difference between a mathematical function and the conception of a function as used in imperative programming is that imperative functions can have side effects that change the value of the program state. Functions are first class objects, which means that they can be used wherever data is used (e.g. assignments, parameters). The concept of locking is used in functional programming. A closure is a function with a referenced environment for the non-local variables of that function. A termination allows a function to access variables that are outside its scope. Advantages of functional languages: Parallelization - With no side effects and unchangeable data, parallelization is easier to manage. (Multi-core processors, etc.) Powerful in expression - It is easier (compared to imperative languages) and more elegant to solve some kinds of problems. Good support for lists and collections - functions for listing data structures are simple (e.g. sorting lists, applying functions to all elements of a list, filtering lists, etc.) Name some of the most well-known representatives of functional programming languages. Multi-paradigm languages ​​Scala, Clojure, Ruby, Haskell, Lisp (widespread use in AI) Smalltalk, Java (anonymous classes vs. degrees) What is configuration management? Changes are constantly happening in software development, so it is absolutely essential to operate change management. Interaction between people - When two people are working on a component, their changes need to be coordinated. Latest version - It must be ensured that everyone has access to the latest up-to-date version. Rollback or Tagging - If something goes wrong with a new version, one needs to be able to revert to an old working version. Fundamental configuration management activities are: Version management - keeping track of different versions of components System integration - defining which versions of components were used to design a system Problem tracking - allowing users to report bugs with reference to the version What are the special features of host-target development? Ivan Antes-Klobucar / ITM11 25

26 Software is developed on a computer (host development platform), but runs on a separate machine (target execution platform). Sometimes the development and execution platforms are the same machine. However, they are usually different such that developed software has to be moved to the execution platform or simulators have to run on the development platform. The software development platform should provide a selection of tools: Integrated compiler and syntax-oriented editing system Debugging system for the language Graphic editing tools (e.g. to edit UML models) Tools for testing (e.g. JUnit) Project-supporting tools What is meant by open source development? Open source development is an approach in software development in which the source code of the software system is publicly available and volunteers are invited to take part in the development process. Its roots lie in the Free Software Foundation, which advocates that source code should not be secret, but should be visible to every user so that they can make changes of any kind. Open source software has extended this idea by using the Internet as a recruiting tool to hire a much larger number of volunteer developers. Many of them also use the code. The best known open source product is the Linux operating system. Most of the successful open source products were platform products rather than application systems. Which license conditions do you know from the field of open source licensing, and what are their special features? GNU General Public License (GPL) - If GPL open source software is used, it must also be open source accessible. GNU Lesser General Public License (LGPL) - Components that link to open source code do not have to be open source unless the open source software components have been modified. Berkley Standard Distribution (BSD) License - Components may be linked to software or changed without restrictions. The original author must be admitted. Ivan Antes-Klobucar / ITM11 26

27 Chapter 5 - Verification & Validation Explain the terms verification and validation. During and after implementation, the program must be checked to ensure that it offers the specifications and functionality that the people who pay for it expect. These processes are called Verification and Validation (V&V): Verification: Are we building the product correctly? Validation: are we building the right product? Describe the two approaches to the verification and validation of software systems. Software inspections, peer reviews (supervision feedback). Software inspections analyze and check the system representations, such as the requirements document, the design diagrams and the source code. Software inspection is a static V&V technique. Software testing. Software testing involves running software with test data. The output and behavior of the software are checked to see if the software is doing exactly what it is supposed to do. Software testing is a dynamic V&V technique. Explain the technology of software inspection, its advantages and the possibilities of automation. Software inspection is a static V&V process in which software is reviewed to find errors and anomalies. The inspection usually focuses on the source code, but any readable representation of the software such as requirements or design model can be inspected. One uses the knowledge of the system as well as the application domain and the programming language or the design model to find errors. Advantages: Error dependencies During testing, errors can hide other errors. A single inspection can discover many defects in a system. Testing Incomplete Systems Incomplete versions of systems can be inspected at no additional cost. Testing other quality attributes An inspection can also examine other attributes of a program, such as compliance with standards, portability and maintainability. One can look out for inefficiencies, unsuitable algorithms, and poor programming style that can make the system difficult to maintain. Automated static analysis Ivan Antes-Klobucar / ITM11 27

28 Inspections are often driven by checklists, errors, and heuristics that identify common errors in various programming languages. For some errors and heuristics it is possible to automate the checklist review process, which resulted in the development of automatic static analyzers for different programming languages. Static analyzers are software tools that scan the source code of a program and reveal possible errors and anomalies. The stages of static analysis include: Control Flow Analysis This section identifies and highlights loops with multiple entry and exit points and unreachable code. Unreachable code is code that falls within the realm of a conditional clause, the condition of which can never be true. Data Usage Analysis This section highlights how variables are used in the program. It tracks down variables that are used without prior initialization and those that are declared but never used. Interface analysis This analysis can check the consistency of operation declarations and their use in a weakly typed language such as C. Interface analysis can also track down procedures that are declared and that are called, or function results that are never used. Path analysis This phase of the semantic analysis identifies all possible paths through the program and defines all statements that are defined in these paths. Ivan Antes-Klobucar / ITM11 28

29 Explain the technology of software testing, its goals and the possibilities of automation. Test cases are specifications about the input to be tested and the expected output of the system as well as a statement about what is being tested. Test data can sometimes be generated automatically. Automatic test case generation is impossible. Execution of the test can be automated; thorough testing, in which every possible program execution is tested, is impossible. Reasons for frustrated developers because of bugs who escaped testing: The user was executing untested code - Due to time constraints, it is not uncommon for developers to release untested code. The order in which statements are executed - The order in which the statements are executed is different in actual use than in the test. The user applied a combination of untested inputs - Because of the wide variety of input combinations, testers have to make difficult decisions about which to test and sometimes the wrong ones are. The user's operating environment was never tested - you might know about the environment but didn't have time to test it.The composition of the user's hardware, etc. was not recreated. Explain the difference between defect and validation testing. Validation Testing To demonstrate to the developer and the customer that the software meets the requirements. This goal leads to validation tests in which the system is expected to correctly execute the given test cases, which reflect the expected use of the system. In validation testing, the test is successful if the system behaves correctly. Defect Testing To discover errors or defects where the behavior of the software is incorrect, undesirable or does not conform to the specification. This goal leads to defect testing, in which the test cases are designed to reveal defects. In defect testing, a test is successful if a defect is identified that causes the system to behave incorrectly. Ivan Antes-Klobucar / ITM11 29

30 What are the three phases of software testing for commercial software and what are the characteristics of these phases? Development testing The system is tested for defects during development. The testers are system designers and programmers. Release testing A separate test team tests a full version of the system before it is delivered to users. The aim is to check whether the system meets the requirements of the stakeholders. User testing (possible) users test the system in their own environment. In the acceptance test, a customer formally tests the system to decide whether it can be accepted by the system provider. What are the differences between Unit Testing, Component (Interface) Testing and System Testing? Unit testing Individual program units or object classes are tested. It focuses on testing the functionality of objects or methods. Component (interface) testing Several individual units are integrated into composite components. It focuses on testing component interfaces (interfaces). System testing Some or all of the components of a system are integrated and the system is tested as a whole. It focuses on testing component interaction. Ivan Antes-Klobucar / ITM11 30

31