Question
Answered step-by-step

Answer all;Employee Information System

comsats hires many employees where each employee belongs to only one department at a time. once an employee is hired, then the name of employee, his designation, salary, allocated department and qualifications (degree, passing year and university) are noted. an employee may have many qualifications. each employee is assigned an employee code for identification purpose. an employee gets promotion to next higher designation when his service period reaches a certain limit. for example, a lecturer gets promotion to assistant professor on the completion of five years job experience. on the other hand, an employee can switch to other department at the same or different designation. for example, an employee working as lab engineer can switch from department of computer science to department of electrical engineering. similarly, an employee who resigned from one job can work on similar designation in same or other department. for example, a lab engineer in department of computer science can switch job to web developer. comsats is interested to know how long an employee offered his services at a certain designation. for example, an employee who was hired as lecturer got promoted to assistant professor after serving for five years. so comsats is interested to know how long he served as lecturer and assistant professor? what was his starting and last salary at both designations?

create ER diagram to model employee information

convert the ER diagram into relational model

Image transcription text

Question 17 Which one of following choices handles if an exception occurs at following line: int a = input.nextint(); Your answer: int a = input.nextint; O handle (InputMismatchException e] { System.er.printIn("exception has been handled"); try { int a = input.nextInt(); O catch [Exception e] { System.er.printIn("exception has been handled"); int a = input.nextInt; O iffInputMismatchException = = true}{ System.er.printIn["exception has been handled"); try { int a = input.nextInt(); O catch [Exception e = = true] { System.er.printIn("exception has been handled");

... Show more

Image transcription text

Question 15 Which is the correct sequence of an exception flow? i. Exception object is created. ii. Statement execution encounters an error. iii. except block handles exception iv. Execution flows to finally block i, ii, iv and iii ii, i, iii and iv i, ii, iii and iv ii, I, iv and iii

... Show more

Image transcription text

Question 2. A merchant has a collection of goods. Help him write a flinction named compute_unit_prices. This function takes in two input. The first input is a dictionary with name of the goods as keys and a list of bulk prices and bulk quantity as value. {See example) The second input is a list of goods' names. The function should return a dictionary. The dictionary shall contain the unit prices with the name of goods as keys and the unit prices as values. The unit price is defined by the bulk price divided by the bulk quantity. Using try and except blocks, should the names in the second input cannot be found in the first, the good's unit price should be a None object, should the unit price cannot be obtained due to a ZeroDiyisionError, the unit price should he -1. Using if else blocks will result in 0 marks for this question. If any other errors are raised, the function should return an empty dictionary

... Show more

Image transcription text

Question 3 (20 points) d Which one of the following statements is correct? The first catch block following a try block will handle the exception. The last catch block following a try block will handle the exception. O The first catch block following a try block that can handle the thrown object will handle the exception. )As long as there is a catch block, the exception will be handle. Save

... Show more

Answer & Explanation
Verified Solved by verified expert

, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing

gue

lestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec

gue

usce dui lectus, congue vel laoreet ac, dictum

m ipsum dolor sit ame

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer
Step-by-step explanation

llentesque d

19432862

gue

ultrices a

19432542

gue vel laor

19433162

gue

usce dui l

sum

sus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risu

dictum vitae odio. Done

19432489
19432497
19432502

Donec

19432477

gue

gue

gue

7 Attachments
image.png
png
image.png
png
image.png
png
image.png
png
image.png
png
image.png
png
image.png
png