Computer Science

Discuss the two main types of constraints on specializations and generalizations…

Question: Discuss the two main types of constraints on specializations and generalizations. Answer: Two main constraints on specialization and generalization are:1. Disjoint Constraint: This specifies that the subclasses of the specialization must be disjoint. This means that an entity can be a member of at most one of the subclasses of the specialization. A specialization …

Discuss the two main types of constraints on specializations and generalizations… Read More »

Model the following in a Java program: In a software engineering project, we are developing software…

Question: Model the following in a Java program: In a software engineering project, we are developing software for an automobile production plant. Wehave the following users in the system: Worker and Manager. Each of these is a user and every user hasname, surname, username, password and address. The worker can be AutoWorker, TruckWorker orBusWorker. The …

Model the following in a Java program: In a software engineering project, we are developing software… Read More »

Floating Point Representation: Show how each of the following floating point values…

Question: Q.1. Show how each of the following floating point values would be stored using the simple model described in the textbook (14-bit format, 5 bits for the exponent with a bias of 15, a normalized mantissa of 8 bits, and a single sign bit). Express your answer in both binary and hexadecimal:22.5-3.50.762525.325 Answer: Q.2. …

Floating Point Representation: Show how each of the following floating point values… Read More »

Your task is to write a C++ program which computes a set of a target heart rate…

Question: Your task is to write a C++ program which computes a set of a target heart rate values associated with human exercise research.The formulas you will need can be found on the following web page: http://en.wikipedia.org/wiki/Heart rate Your program should prompt the user for two integers, the subject’s age in years (age) and the …

Your task is to write a C++ program which computes a set of a target heart rate… Read More »

Suppose two binary trees, T1 and T2, hold entries satisfying the heap-order property…

Question: Suppose two binary trees, T1 and T2, hold entries satisfying the heap-order property (but not necessarily the complete binary tree property). Describe a method for combining T1 and T2 into a binary tree T, whose nodes hold the union of the entries in T1 and T2 and also satisfy the heap-order property. Your algorithm …

Suppose two binary trees, T1 and T2, hold entries satisfying the heap-order property… Read More »

Write a C++ program in which you are required to define a class named Citizen…

Question: Write a C++ program in which you are required to define a class named Citizen. The class must include the following two data members.NameNationalityYour Program should define three constructors for the class Citizena constructor with no parametera copy constructorAll of these constructors are meant to initialize their respective objects. In the case of the …

Write a C++ program in which you are required to define a class named Citizen… Read More »

Draw the hash table from Exercise using a table size of 17 and open addressing using linear probing.

Question: Draw the hash table from Exercise using a table size of 17 and open addressing using linear probing. Exercise Draw the hash table that results from adding the following integers (34 45 3 87 65 32 1 12 17) to a hash table of size 11 using the division method and linked chaining. Answer: …

Draw the hash table from Exercise using a table size of 17 and open addressing using linear probing. Read More »

Which of the following network transmission media offers the highest…

Question: Which of the following network transmission media offers the highest potential throughput over the longest distances?a. MMFb. SMFc. UTPd. STP Answer: Step: 1 of 2 Single-Mode Fiber has a small core of 8 to 10 microns in diameter. Laser lights go along one path in the core and reflect quiet little so the signals can …

Which of the following network transmission media offers the highest… Read More »

Write a C program in Linux to implement the following functionalities

Question: Write a C program in Linux to implement the following functionalitiesDeclare a global variable usr_interrupt=1Write a signal handler functionvoid reset_signalvaluezero ()When a SIGALRM signal arrives this function will be called in which variable will be setsig_atomic_t usr_interrupt = 0;Write a signal handler functionvoid Increment_signalvalue ()When a SIGINT signal arrives this function will be called …

Write a C program in Linux to implement the following functionalities Read More »

Develop a flowchart and then write a menu-driven C++ program that uses several user-defined functions, overloaded functions, and references.

Question: Develop a flowchart and then write a menu-driven C++ program that uses several user-defined functions, overloaded functions, and references. Upon program execution, the screen will be cleared and the menu shown below will appear at the top of the screen and centered. The menu items are explained below.                                 Help                        Smallest                        Largest                       Quit H or h ( for Help ) option …

Develop a flowchart and then write a menu-driven C++ program that uses several user-defined functions, overloaded functions, and references. Read More »