Write a C# Program to rotate an Array of size 10 in left and right Direction three times Create a Class of ArrayRotate with data member of integer type array of size 10, property of that member, all constructors, destructor, user define displayArray() Method, RotateLeft(int[] arr) Method, RotateRight(int[] arr) Method. Then test the functionality of Class in the Driver Class of RotateArray.
Perform Question#1 with using Arraylist Class rather than basic Array.
Create a class called Scholarship which has a function Public void Merit() that takes marks and fees as an input. Merit method should get an marks as input using params
If the given mark is >= 70 and <=80, then calculate scholarship amount as 20% of the fees
If the given mark is > 80 and <=90, then calculate scholarship amount as 30% of the fees
If the given mark is >90, then calculate scholarship amount as 50% of the fees.
In all the cases return the Scholarship amount
Calculate overall percentage obtained by cadet in different assessments and generate score card.
The program should collect assessment details for cadet and calculate percentage score obtained by cadet for all the assessments .The details collectedand calculated should be used to generate score card.
The exercise contains a class named program with the below given methods.
GetOverallScore() : int
- should take set of assessment cards as parameter.
- Retrieve the maximum score for each assessment type. Assessment type should be an enumeration.
- should return percentage score value as integer for the average calculated.
GenerateScoreCard() : string
AssessmentType : enum
Maximum scores for these assessment types are:
Quiz -50
KBA - 100
Calibration -150
Hackathon -200
- the maximum score must be obtained from the enum values itself
AssessmentCard : struct
Create an Observable Collection. Listen to its Collection Changed Event and
display message on UI for each operation.
1. Addition: “Element ‘x’ is added in collection”
2. Removal: “Element ‘x’ is removed from collection”
Use enum NotifyCollectionChangedAction to differentiate the action
Create a person class and instantiate an object student based on this Class. The class can set an age, say hello, display her age on the screen and start the explanation.
Example of the output
My age is 21 years old
I'm studying
Hello!
I'm explaining
How are you getting the prices of the bill?
1.Make a Console App with a class that encapsulates the following information about a bird: English name, Latin name, and Date last seen. Allows the user to fill in the details about a bird. The data is saved in a Bird object, which is then displayed to the user. 2.In the program, create a superclass called Animal and update class Bird to inherit from it. Create a new class named Butterfly that allows the user to collect butterfly data. 3.Display the percentage of birds and butterflies in the app when displaying the birds and butterflies. When there are no entries in the app yet, use exception handling to handle the divide by zero. 4.Create an interface called ISighting with a single method called displaySighting. Implement the interface in Animal but leave the displaySighting method abstract. Implement the displaySighting method in both the Bird & Butterfly classes to display all the information known about the animal to the console.Update app so that the user can choose to add a bird or a butterfly.
The program simply calculates the pay(hourlyrate*normal hours)
Output displayed
Enter hourly rate : 21,50
Enter normal hours worked : 2
Hourly rate : R21,50. Normal hours :2
PAY : R43,00
Create a program using C# that implements the stream ciphers Cryptographic method . A stream cipher method inputs digits, bits, or characters and encrypts the stream of data. The onetime pad is an example of a stream cipher.
In this formative you have been requested to create an application that will work as the One-time pad (OTP), also called Vernam-cipher or the perfect cipher. This is a crypto algorithm where plaintext is combined with a random key and generate a ciphertext.
Marks allocation
1. The programme should received a string " How are you Isaac " - 10
2. The programme should generate an OTP of the length of the string entered "How are you Isaac "- 10
3. The program should Generate a Ciphertext based on the above example- 30
Create console programs:
Example output:
Enter 5 grades:
90
83
87
98
93
The average is 90.2 and round off to 90.