Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on your computer and catch the errors with try: except: blocks. Include the code and output for each example in your post.
Describe how you might deal with each error if you were writing a large production program. These descriptions should be general ideas in English, not actual Python code.
Question 1
A. Jacobson has been given a project to design relational database for a company. He intends to start with logical design instead of conceptual design. What problems are likely to arise if the logical design of the relational database is created?
B. Suggest appropriate strategy one can use to address the problems that would arise as a result of starting the database design from logical design. Explain the process to get the issues resolved to satisfy certain constraints.
Question 2
A. Using the right integrity rules, explain why it is important to control how
data is deleted from relational database.
B. In your own words, explain why one cannot consider every table as a
relation. [10 Marks] C. All relations are in 1st Normal form. Explain.
Question 1
A) Write a game entirely in shell script which generates an unknown number and prompts the player to enter a number. Your game should receive the number and compare it to the generated number, let your game tell the player whether the number entered is higher than or lower than the hidden number until the player is able guess the number or quit the game, upon guessing the right number the game should congratulate the player for winning and tell the player how many attempts were made before guessing the right number.
B) Write a shell script that uses a function to count the number of files in the present working directory and output their number to the screen.
C)Explain with examples how to make variables available to child processes/shells
D) Many beginners are confused about the difference between the working of touch and of cat, could you please make the difference clear with an example
Create a class Box containing length, breath and height. Include following methods in it:
a) Calculate surface Area
b) Calculate Volume
c) Increment, Overload ++ operator (both prefix & postfix)
d) Decrement, Overload -- operator (both prefix & postfix)
e) Overload operator == (to check equality of two boxes), as a friend function
f) Overload Assignment operator
g) Check if it is a Cube or cuboid
Write a program which takes input from the user for length, breath and height to test the
above class.
Question 3
a) I have no need for security management functions because I am using a dedicated and secure management network. Please comment on this statement
b) Performance and accounting management are similar, in that both are interested in collecting usage data from the network. Describe an important way in which the use of this data and the requirements for its collection differ.
c)A company has had several virus infections over the past few months. The infections were caused by vulnerabilities in the application versions that are being used. What should an
administrator implement to prevent future outbreaks?
Question 4
a)
As a network administrator, design a network diagram for an organization having six
offices in in a different region making sure that users can access all the organization’s network
b) A technician wants to securely manage several remote network devices. Explain what
should be implemented to securely manage the devices?
c) After a company rolls out software updates, Ann, a lab researcher, is no longer able to use lab equipment connected to her PC. The technician contacts the vendor and determines there is an incompatibility with the latest IO drivers. Explain what should the technician perform so that Ann can get back to work as quickly as possible?
A. Consider a problem to find the student who had the highest GPA for the 2020/2021 academic year.
i. Explain your choice of either a search or a sorting algorithm to solve this problem.
ii. Write the algorithm for your implementation.
B. Consider the analogy of a pile of books on a table. Using a diagram, explain the basic operations involved in adding a book to the pile and removing a book from the pile.
The performance of an algorithm can be determined in terms of its time and space complexity. Explain the difference between time complexity and space complexity and make a case for which is the most efficient method for determining the performance of an algorithm
Refer to the code segment below and answer the questions in the comments labelled Question 1 – 6 For each answer; provide a brief explanation for your answer. Each answered question earns you three (3) marks.
public class Scope
{
private int x = 2;
private int x = 1;
public void start()
{
int x = 5; int x = 2;
//Question 1
System.out.printf( "The value of x is %d\n", x );
int x = 2;
//Question 2
System.out.printf( "\nThe value of x is is % d\n", x ); }
// end method begin
public void middle()
{
int x = 25;
//Question 3
System.out.printf( "\nThe value of x is %d\n", x );
++x;
//Question 4
System.out.printf( "The value of x is %d\n", x );
} // end method middle
public void end()
{
//Question 5
System.out.printf(
"\nThe value of x is %d\n", x );
x *= 10;
//Question 6
System.out.printf( "The value of x is %d\n", x );
} // end method end } // end class Scope