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
· class Shuttle should include:
· suitable fields as specified above. The "from" planet and the "to" planet should be Planet objects
· a small range of accessors/mutators to process data held by the class
· method which returns a boolean saying whether a permit given as a parameter can enter the shuttle
· a method to process a permit moving to the destination planet;
o if the permit meets the conditions, remove it from the source planet, add it to the destination planet, update information on the permit, and return a suitable message
o if it does not meet one of the conditions, return an appropriate message and do NOT move it
· a method toString()which returns a String representation of an object of that class (no need to list all of the planet details, just the planet numbers and names)
t
·
· class Planet should include:
· suitable fields as specified above.
· a constructor to create a planet using suitable parameters
· accessors to return its planet number, name, luxury rating
· an ArrayList field to store Permit object references.. (declared and created)
· mutator ; enter()which has a Permit as a parameter and adds it from the ArrayList
· mutator leave()which has a Permit as a parameter, finds its position in the ArrayList and then removes using position.
· an accessor which either says whether the planet is full (reached capacity) (..or still has capacity)
· method to list all the Permits currently on the planet
· methods to find and return details of one Permit on the planet
· an accessor which returns a boolean saying whether a Permit is in the planet (in the ArrayList)
· a toString () method which includes planet details and a list of the Permits in the planet
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
Sum of prime numbers in the input
1- Write a program to demonstrate static variables, methods, and blocks.
2- Write a program in C# Sharp to create a user define function.
3- Write a program in C# Sharp to create a user define function with parameters.
4- Write a program in C# Sharp to create a function to display the n number Fibonacci
sequence.
5- Write a program in C# Sharp to create a function to calculate the sum of the
individual digits of a given number.
Enter a number: 1234
Expected Output:
The sum of the digits of the number 1234 is: 10
6- Write a program to calculate the roots of Quadratic equations using encapsulation.
7- Write a program for calculating Matrix Operations.
1. Addition.
2. Multiplication.
Implement the following functions. The functions return a real number:
(a) Function Celsius returns the Celsius equivalent of a Fahrenheit temperature ((32°F − 32) ×
5/9 = 0°C).
(b) Function Fahrenheit returns the Fahrenheit equivalent of a Celsius temperature.
((0°C × 9/5) + 32 = 32°F)
In main call both functions and ask user to input value of temperature and print its equivalent.
1- Write a program to demonstrate static variables, methods, and blocks.
2- Write a program in C# Sharp to create a user define function.
3- Write a program in C# Sharp to create a user define function with parameters.
4- Write a program in C# Sharp to create a function to display the n number Fibonacci sequence.
5- Write a program in C# Sharp to create a function to calculate the sum of the individual digits of a given number. Enter a number: 1234 Expected Output: The sum of the digits of the number 1234 is: 10.
6- Write a program to calculate the roots of Quadratic equations using encapsulation.
7- Write a program for calculating Matrix Operations. 1. Addition. 2. Multiplication
1 Write a program to demonstrate static variables, methods, and blocks.
2 Write a program in C# Sharp to create a user define function.
3 Write a program in C# Sharp to create a user define function with parameters.
4 Write a program in C# Sharp to create a function to display the n number Fibonacci
sequence.
5 Write a program in C# Sharp to create a function to calculate the sum of the
individual digits of a given number.
Enter a number: 1234
Expected Output:
The sum of the digits of the number 1234 is: 10
6 Write a program to calculate the roots of Quadratic equations using encapsulation.
7 Write a program for calculating Matrix Operations.
1. Addition.
2. Multiplication.