subject

JAVA ASSIGNMENT Understand the Problem
In our lectures, we learned that boolean functions can be fully described by an array of booleans, where the input of the function is the int index to the array, and the output is the boolean value stored in that index position. We are going to wrap such an array of booleans into a class called BooleanFunc (which, of course, stands for boolean function). This will represent a boolean function of any non-negative size and take precautionary measures that you would expect of a wrapper class that surrounds an unstructured type such as an array. Our goal will be to define the logic of a seven-segment display which is little more than seven boolean functions wrapped in a device that can be viewed visually.
We could do the entire project with two classes, BooleanFunc and SevenSegmentDisplay, but we will find that it is simpler to break the functionality of SevenSegmentDisplay into four classes, two of which we'll do this week (MultiSegmentLogicand SevenSegmentLogic) and two of which we'll do next week (SevenSegmentImage and SevenSegmentDisplay).
BooleanFunc will hold the truth table in a 1-D array of type boolean. As we know from the modules, this tells us what the output is for any integer input, and those integer inputs are the encoded binary bits going into the table. The class allows the instantiation of any non-negative size boolean function, and once instantiated, cannot be resized (no mutator for the table size), but it can be redefined (meaning the values of the function can be changed, or if the RHS of a clone()assignment, its reference will point to an object of a potentially different size). Of course, it protects itself against client abuse.
We will define a general base class called MultiSegmentLogic, which can be extended to cover a multi-segment display having any number of segments, but our intent is to extend it to cover a seven-segment display. We will be thinking in terms of the seven-segment display throughout the design of the class, but we'll design MultiSegmentLogic so that it could support a hypothetical 49-segment display, 1000-segment display or any other size the client wishes.
We will derive SevenSegmentLogic from MultiSegmentLogic, baking the specifics of a seven-segment display into this derived class.
MultiSegmentLogic, and SevenSegmentLogic are so named because they do the boolean logic of the displays, but do not actually produce any visual representation. This is not only more manageable (you would be hard pressed to do both the logic and the display in a single week), but is in keeping with the separation of interface and implementation.
Of course, we'll test our classes as we go, and you will demonstrate that your classes and methods work with a main() that tests the individual components.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
After you clean an engine with hot water spray, it seems to stall; when it doesn't stall, it's idling noisily. technician a says to check for loose bolts on the flex plate near the torque converter. technician b says to wipe down the spark plug wires and the distributor cap. who is correct? a. technician a b. both technicians a and b c. technician b
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 03:00
Your business be in google top rank.more the rank more the business leads.for best seo and digital marketing services be confident to contact you can get best seo solutions by assistance experts provide digital marketing, website development, seo expert services and social media internet seo expert services your branding solutions. seo expert services ,best seo expert services,online seo expert services,
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
You know the right answer?
JAVA ASSIGNMENT Understand the Problem
In our lectures, we learned that boolean functions can...
Questions
question
Mathematics, 18.04.2020 11:26
question
Biology, 18.04.2020 11:27
question
History, 18.04.2020 11:27
question
Health, 18.04.2020 11:27
Questions on the website: 13722367