Write a program that uses a structure Vector. This structure stores an array
V of double numbers, size of array n. This structure contains:
i. Function to input n, and all elements of V.
ii. Function to display n, and all elements of V.
iii. Function to reverse the order of elements of V.
iv. Function to return the element that appears most frequently in the
array.
The program declares a variable of Vector, and applies all functions on it.
Given a relation R( P, Q, R, S, T, U, V, W, X, Y) and Functional Dependency set FD = { PQ → R, PS → VW, QS → TU, P → X, W → Y }, determine whether the given R is in 2NF?Describe anomalies of database.(10marks)
) Check the given schedule for conflict serializability:
S1: R1(X) R1(Y) R2(X) R2(Y) W2(Y) W1(X)Even Out
by CodeChum Admin
You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!
Now, let's try this one more time!
Instructions:
Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).
Input
A line containing two integers separated by a space.
5·10
Output
A line containing integers separated by a space.
6·8·10
Even Out
by CodeChum Admin
You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!
Now, let's try this one more time!
Instructions:
Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).
Input
A line containing two integers separated by a space.
5·10
Output
A line containing integers separated by a space.
6·8·10
Factorials
by CodeChum Admin
For those of you who may not now, a factorial is a product of multiplying from 1 until the number. Now, you must make a program that will accept an integer and then print out its factorial using loops.
Are you up for this task?
Instructions:
Input a positive integer.
Using a for() loop, generate the factorial value of the integer and print out the result.
Tip #1: Factorials work like this: Factorial of 5 = 1 * 2 * 3 * 4 * 5
Tip #2: There's a special case in factorials. The factorial of 0 is 1.
Input
A line containing an integer.
5
Output
A line containing an integer.
120
Using dynamic array implement the following :
1. Create the list. The list is initialized to an empty state.
2. Determine whether the list is empty.
3. Determine whether the list is full.
4. Find the size of the list.
5. Destroy, or clear, the list.
6. Determine whether an item is the same as a given list element.
7. Insert an item in the list at the specified location.
8. Remove an item from the list at the specified location.
9. Replace an item at the specified location with another item.
10. Retrieve an item from the list at the specified location.
11. Search the list for a given item
Visit any institution in Sierra Leone Government or Private and study their functions or services and develop a java console application that either overhaul or automate it.
Implement the following java concept in your solution and highlight in your documentation or code where you did it:
1. Class and Object
2. File and Stream
3. Exception Handling
Outcomes
On successful completion of this project, students will be able to:
● Analyse, design, and develop application using Java.
● Understand and implement some basic java concepts and principles.
● Identify real life problems and find technological solution to them.
develop a java console application that either overhaul or automate it.
Implement the following java concept in your solution and highlight in your documentation or code where you did it: and explain the steps
1. Class and Object
2. File and Stream
3. Exception Handling
An investment firm wants to sell N shares of a particular stock. The firm receives “m” bids of the form “ni shares for ₹ ri”. How will you characterize this as fractional knapsack problem and 0-1
Knapsack problem.
Bidders are only interested in acquiring their complete order. If the the firm wants to service the maximum number of bidders, suggest an algorithm to solve the problem.
Let S = {I1, I2, I3, I4, I5, I6, I7} be a collection of items with (weight, values) pairs:
Item Weight Value I1 2 4
I2 3 6
I3 1 5
I4 3 7
I5 1 3
I6 2 1
I7 1 6
Consider items are divisible (can be broken), find a subset of items that can fit into the bag of weight capacity 7 and value of the items collected in the bag should be maximized? Show your work.