Question: answer the following in C++ QUESTION 1. This is a compulsory question related to OOP. You are required to provide an answer that includes a

answer the following in C++

answer the following in C++ QUESTION 1. This is a compulsory question

QUESTION 1. This is a compulsory question related to OOP. You are required to provide an answer that includes a UML diagram, a textual description and code written in C++; A logic gate is an electronic component that performs a Boolean function. It accepts one or more binary inputs and gives one output. There are seven logic gates, namely: - NOT - AND - OR - NAND - NOR - XOR - XNOR All of the above gates with the exception of the NOT gate takes 2 or more inputs. The NOT gate takes only one input. All of the gates give one output as explained in the truth tables available in Appendix 1 of this examination paper. You are required to design and implement part of a program that is going to be used to work out Boolean functions. Answer the following two questions: a) Design (preferably using UML) the structure that is going to take care of the various logic gates. Note that each logic gate should be able to accept binary inputs and give a binary output. In your design make sure to use the concepts of encapsulation, inheritance and polymorphism. Your design should be accompanied by a clear technical description. [6 marks for correct use of OOP techniques] [8 marks for correct UML class diagram] [6 marks for correct technical description] [20 marks] b) Write the required code in C++ for the implementation of the AND gate and the NOT gate. In your code include the implementation of any super classes used

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!