Questions
Why do you think present value is important when evaluating capital investments? Give an example of...

Why do you think present value is important when evaluating capital investments? Give an example of how you could use present value to make a decision in your current job. Do not forget to use APA format on your sources and in-text citations.

In: Accounting

for the research topic Effect of Cloud-Based Services on Small Businesses in Developing Countries: Case Study...

for the research topic

Effect of Cloud-Based Services on Small Businesses in Developing Countries: Case Study of Khomas Region, Namibia

Write the following

1. limitations

2 delimitations

3 research questions

4. research ethics

please note to put your citations and reffeences

In: Computer Science

submit the following files: Main.java Consider the following code: import java.util.Scanner; public class Main { public...

submit the following files:

  • Main.java

Consider the following code:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

Scanner in = new Scanner(System.in);

String input = "";

System.out.println("Enter the first number: ");

input = in.nextLine();

int a = 0;

int b = 0;

a = Integer.parseInt(input);

System.out.println("Enter the second number: ");

input = in.nextLine();

b = Integer.parseInt(input);

int result = 0;

result = a/b;

System.out.println("a/b : " + result);

}

Copy the code to your Main.java file and run it with the following inputs:

  1. 34 and 0;

  2. ‘Thirty-four’ as the first input.

What prevented the program from running successfully?

Update the code, so that it can handle cases a) and b).

Please note the following:

  • You have to use try-catch to handle exceptions. You will get zero credit otherwise;

  • To determine exception classes, that you need to catch, use error message from the respective case (a) and b)). Hint: to handle String-to-integer conversion, use NumberFormatException;

  • Exceptions should be caught so that:

    • Code never crashes due to non-numeric input (both for first and second values);

    • Code never crashes due to division by zero;

    • If non-numeric value is entered for a or b, program should output "Error: entered value is not an integer number. Exiting..." and exit (use System.exit(0); to exit);

    • If zero value is entered for b, program should output " Error: cannot divide by zero. Exiting..." and exit (use System.exit(0); to exit);

  • Hints: Use 3 try-catch blocks in total. Try block should only contain the command, that can throw an exception.

PLEASE FOLLOW ALL THE INSTRUCTIONS PRECISELY

In: Computer Science

Question 1 [multiple answer] a relation in mathematics Is much like a database table except that...

Question 1

[multiple answer] a relation in mathematics

  1. Is much like a database table except that relations are sets, i.e. Don't allow duplicates whereas DBMSs may return tables with duplicates
  2. Is not very much like a database table, because it only refers to such expressions as "greater than"
  3. Is like a database table with exactly two columns, no more and no fewer
  4. Is similar to a database table, but database tables cannot have infinitely many rows

Question 2

[multiple answers] in the relational model, relations are commonly used

  1. To represent entities of the ER model
  2. To represent relationships of the ER model
  3. To represent multi-valued attributes
  4. To represent derived attributes

Question 3

[multiple answers] constraints on relations in normal RDBMSs (not considering MS access)

  1. Are tools for querying tables
  2. Are tools for aiding data quality
  3. Are tools for improving security
  4. Are tools for filtering out records that should not get inserted

Question 4

[multiple answers] which of the following constraints can be violated by inserting a record into a database table?

  1. Primary key constraint
  2. Domain constraint
  3. Referential integrity (foreign key) constraint
  4. Constraint on null

Question 5

[multiple answers] which of the following constraints can be violated through a deletion of a record from a database table?

  1. Primary key constraint
  2. Domain constraint
  3. Referential integrity (foreign key) constraint
  4. Constraint on null

Question 6

[multiple answers] assume a table A with primary key aid, and a table B with primary key bid and foreign key aid which references aid in table A. Which of the following operations can result in a violation of the referential integrity (foreign key) constraint?

  1. Insertion of a record into table A
  2. Insertion of a record into table B
  3. Deletion of a record from table A
  4. Deletion of a record from table B

Question 7

[multiple answers] referentially triggered actions

  1. May happen as a result of a deletion of a record because its primary key value is referenced by a foreign key value in a different relation
  2. May happen as a result of a deletion of a record because it has a foreign key value that references a primary key value in a different relation
  3. Are typically the result of defining a trigger for enforcing semantic integrity constraints
  4. May happen as a result of an insertion of a record that defines a foreign key value for which no primary key value exists in a referenced table

Question 8

[multiple answers] a 1-to-1 relationship in the entity-relationship model can be represented in the relational model

  1. By combining the two entities into one table
  2. By adding a foreign key to one of the tables, which references the primary key of the other table
  3. By creating a separate table that has two foreign keys, which reference the primary keys of the two tables that represent the entities
  4. Cannot be represented at all in a relational database

Question 9

[multiple answers] a 1-to-many relationship in the entity-relationship model can be represented in the relational model

  1. By combining the two entities into one table
  2. By adding a foreign key to the table on the "many" side of the relationship, which references the primary key of the other table
  3. By adding a foreign key to the table on the "1" side of the relationship that references the primary key of the other table
  4. By creating a separate table that has two foreign keys, which reference the primary keys of the two tables that represent the entities

Question 10

[multiple answers] a many-to-many relationship in the entity-relationship model can be represented in the relational model

  1. By combining the two entities into one table
  2. By adding a foreign key to one of the tables, which references the primary key of the other table
  3. By creating a separate table that has two foreign keys, which reference the primary keys of the two relations that represent the entities
  4. Cannot be represented at all in a relational database

In: Computer Science

Database Design and Management Question: Discuss the security needs of DBMS solution. Recommend a comprehensive but...

Database Design and Management Question: Discuss the security needs of DBMS solution. Recommend a comprehensive but high-level security management plan for the design.

In: Computer Science

Explain how you will find articles on any nursing issues from HINARI database using a computer...

Explain how you will find articles on any nursing issues from HINARI database using a computer at your school internet laboratory.

In: Nursing

discussed big data , data warehouse and google database for big data and bootstrapping technique for...

discussed big data , data warehouse and google database for big data and bootstrapping technique for data analytics to a real life business scenario.

In: Computer Science

In your own words, define the following database terms and give an example of each: Table...

In your own words, define the following database terms and give an example of each:

Table

Record

Field

Primary Key

Foreign Key

In: Computer Science

Describe how foreign keys impact the ability to add or delete rows from a table or...

Describe how foreign keys impact the ability to add or delete rows from a table or the ability to drop tables from a database schema.

In: Computer Science

Views are virtual in database but Materialized view are persistent. Discuss the need to have materialized...

Views are virtual in database but Materialized view are persistent. Discuss the need to have materialized view instead of views and in what condition No materialization if preferred.

In: Computer Science