Completed

Two exercicies: exception handling and Threading

Published on the July 07, 2021 in IT & Programming

About this project

Open

I need someone to do this 2 exercicies. The first one is very easy:

1 . Own exceptions classes can be defined inheriting properties from existing exceptions.
Define custom exceptions to be used in the code. Throw you exceptions using the command “throw”.
2. Threding exercicie:
Implement a program that writes the odd numbers between a lower and
upper bound to the console. This should be done in a thread where the
thread takes a set of parameters. 10 threads should be started in parallel!
      1.
Implement a class “ThreadParameters” including
– threadNumber [int], values 1-10
– delay [int], delay time should be the threadNumber times 75 in milliseconds
– lowerBound [int],random number between 5 and 21
– upperBound [int], random number between lowerBound and 25
    2. Implement a class “Printer” with a method “print”. This method shall
output the odd numbers between the lower and upper boundary
together with the thread number (called using the threads)
    3.
The output should be “delayed” (using sleep)
    4. Consider data encapsulation and create a new cs-file for each class!

Category IT & Programming
Subcategory Other
Project size Small
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed

Delivery term: July 12, 2021

Skills needed

Other projects posted by B.