Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a program to implement the Date class which has three data members named day, month and year.

 

1.  Provide a constructor, which takes arguments (you may set values of data members to 0).

 

2.  Write getter and setter functions (input and show functions) for the Date class.

3.  Also write a member function void CompareDates(Date d1, Date d2) which tells which date comes first.


Create a class Circle having a data member radius. The class should be capable of calculating the area. Compare the areas of two circles and also displaying the area of which circle is greater. Make all the necessary function as needed including constructors.

Write a program of static data memeber


The String_collection.txt file contains 4000 random English names (keys), write a C++ program that generates hash codes for each key using polynomial accumulation. In addition your program should perform the following tasks. consider a=37 [constant]

Write separate function for each task and call it in proper order

1. Create a hash table to store the keys based on the hash values generated

➢ Hash value: h(key)=|hash code| mod N , use appropriate value for N

➢ For collision handling use separate chaining

1.1. Write a function insert(key), and find(key) to insert and find the key in the hash table.

1.2. Write a display function that display all the keys in ascending order of hash values (line-wise) such that each line display the keys (names) having the same hash value.

1.3 Find the hash value with maximum number of collisions and display all the string associated with this hash value

2. Compare the total number of collisions for a=33, 37, 39, 41

2.1. Display the total number of collisions occurred for each case


consider an array marks[20][5]which stores the marks obtained by 20 students in 5 subjects



write a 2D array to show average of 5 subjects for 20 students


Assume your team is part of a research project. Your team wants to create a simple software that compares two strings, but they're undecided about whetheror not to use pointers. Your group now has the duty of creating or converting your initial code into a pointer-based compare two strings program and determining whether or not pointers are useful in this program.

Example like this:
#include <iostream>
using namespace std;
string convert(string s)
{
for (int i=0; i<s.length() ;i++)
{
 s[i]=toupper (s[i]);
}
return s;
}

int main()
{ 
string string01,string02;
cout<<"String 1 : ";
cin>>string01;
cout<<"String 2 : ";
cin>>string02;

if(convert(string01)==convert(string02))  {
cout<<"Two strings is equal";
}
else{
cout<<"Two strings is not equal";
}
}
Write a complete program to convert infix expression to postfix expression using stack implemented through linked list. Keep in mind limited operations available to stack.

Implement a class that realizes linked lists consisting of nodes with integer values.a) bool isEmpty(); b) int length(); returns the number of nodes in the list, which is 0 for the empty list. c) void print(); print the content of all nodes. d) void addAsHead(int i); creates a new node with the integer and adds it to the beginning of the list. e) void addAsTail(int i); creates a new node with the integer and adds it to the end of the list. f) Node find(int i); returns the first node with val i. g) void reverse(); reverses the list. h) int popHead(); returns the value of the head of the list and removes the node, if the list is nonempty, otherwise returns NULL. i) void removeFirst(int i); removes the first node with val i. j) void removeAll(int i); removes all nodes with val i. k) void addAll(List l); appends the list l to the last element of the current list, if the current list is nonempty, or lets the head of the current list point to the first element of l if the current list is empty.


Write a program to enter a number that should be less than 100 and greater than 9.



LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS