Computer Science

Write a C++ program that will sort a template array of data using the following guidelines

Question: Write a C++ program that will sort a template array of data using the following guidelines – 1. Ask the user for the number of elements, not to exceed SORT_MAX_SIZE = 16 (put appropriate input validation) 2. Ask the user for the type of data they will enter – int, string, or Dollar. 3. …

Write a C++ program that will sort a template array of data using the following guidelines Read More »

Write a program that will sort an array of data using the following guidelines

Question: Write a program that will sort an array of data using the following guidelines – DO NOT USE VECTORS, COLLECTIONS, SETS or any other data structures from your programming language. C++ Ask the user for the number of elements, not to exceed SORT_MAX_SIZE = 16 (put appropriate input validation) Ask the user for the …

Write a program that will sort an array of data using the following guidelines Read More »

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 »