In: Computer Science
My Teacher gave this answer and we need to response this answer You need to response this answer why you agree with it or why you disagree and explain
Answer:- If I need to do the analysis and develop a logical model for the university's enrollment system, I think it's better to use a top-down approach. The difference between the top-down and down-up approaches is that the top-down approach moves from general to specific, and the bottom-up approach starts from specific and moves to general. The advantage of the top-down approach is that a complex algorithm is broken down into smaller fragments, better known as ‘modules.’ It is further broken down into smaller pieces when it can no longer be fragmented. Breaking the Bigger Problem into Small Pieces A top-down approach minimizes what typically occurs while designing an algorithm. This is because the course registration system can be divided by utilizing features and analyzed in all subsystems, I prefer to use the top-down approach.
2. Perform a Internet search upon the term and concept black box as it pertains to computer science. Why is this an important concept within software design and development? Why is this concept important within the context of code reuse?
Answer :- The concept of the black box is a demonstration how the input is transformed to an output. This is an important concept to consider within software design in regards to the way the program is supposed to work. For the input of code, the programmer wants a specific output while the computer outputs what it is programmed to do. The reason it is a black box is to illustrate the internal processes the computer uses to determine the output, such as binary code. This idea is crucial for recycling code because when the output of the code is successful, programmers can implement the same code for another program to decrease time consumption.
1st Question:
I do agree with the top down approach to designing a large system. First we would assume a single entity which would be a registration system. As we dive deeper into its functionality we would systematically break the single entity down into its principle components while maintaining all units within the context boundary of our system. As we unfold the system we also identify the relationship between the entities or the data flow. We could define such a system to maximal specificity using Data Flow Diagrams of increasing levels. After defining the internals of our system we can then look to create interfaces that help our system interact with the outside world i.e. outside the context boundary of the system.
A bottom-up approach would take much more work, and is not usually suggested when first scoping out functionalities of the system as it forces us to define everything in detail from the very start and this is not always possible when designing a new system, we need to be open to changes in system design and understand that requirements evolve with time, a top down approach usally leads to a much more flexible design
Question 2:
I think the question has been answered wrongly. "Black box" specfically refers to behaviour of a system, functionality or how a system presents or interacts itself to/with the outside world. without regards to the internal implementations, code or how inputs are transformed to outputs. Blackbox similar to top down helps to define high level entities useful while designing a system. Mostly "Black box" extends to the concept of "Black box Testing" in which we feed inputs to the system a test for required outputs. This concept of abstraction helps in what is known as Test Driven Development or TDD. Using this tool software architects can design a high level system setting expectations of how an entity/ code segment should behave by specifying its inputs and outputs. Using such a documentation, developers can formulate software prototypes faster.
I think the code reuse part comes from the concept of abstraction in "Black box" design, that we are only concerned with how a given entity behaves or what a function takes in and what it returns ,and as mentioned earlier, without concern about its internal implementation. This allows others to just call a piece of code to satisfy a given task. Similar to how most libraries are designed, for example high level datastructures in java or c++ for stacks, queues etc. We can directly call them in our code without needing to know how they are implemented internally, so they are sort of Black Boxes for us.
What the teacher has referred to can be considered as White Box which extends to White Box Testing in which we model and test the internal workings of a system and how input data flows through the code and is transformed to the output.