1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
lidiya [134]
3 years ago
8

Fromwhich object do you ask for DatabaseMetaData?ConnectionResultSetDriverManagerDriver

Computers and Technology
1 answer:
icang [17]3 years ago
8 0

Answer:

Connection

Explanation:

We can get DatabaseMetaData from the java.sql.Connection object.

The relevant API call is Connection.getMetaData().

This returns an object of the type DatabaseMetaData.

Some of the methods available as part of the DatabaseMetaData object are:

  • getDatabaseMajorVersion()
  • getDatabaseMinorVersion()
  • getDriverName()
  • getDriverVersion()
  • isReadOnly()
  • getCatalogs()
  • getTables()
  • supportsBatchUpdate()
  • supportsUnion()
You might be interested in
What is a help desk
vagabundo [1.1K]

Answer:

C: An individual who diagnoses and resolves users' technical hardware and software problems

6 0
4 years ago
For this program you will build a simple dice game called Pig. In this version of Pig, two players alternate turns. Players each
Eddi Din [679]

Answer:

In Python:

import random

p1name = input("Player 1: "); p2name = input("Player 2: ")

p1score = 0; p2score = 0

playerTurn = 1

print(p1name+" starts the game")

roll = True

while(roll):

   if playerTurn == 1:

       p1 = random.randint(1,6)

       print(p1name+"'s roll: "+str(p1))

       if p1 == 1:

           playerTurn = 2

           roll = True

       else:

           p1score+=p1

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 2

               roll = True

   else:

       p2 = random.randint(1,6)

       print(p2name+"'s roll: "+str(p2))

       if p2 == 1:

           playerTurn = 1

           roll = True

       else:

           p2score+=p2

           another = input("Another Roll (y/n): ")

           if another == "y" or another == "Y":

               roll = True

           else:

               playerTurn = 1

               roll = True

   if p1score >= 50 or p2score >= 50:

       roll = False

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

Explanation:

Note that the dice rolling is simulated using random number whose interval is between 1 and 6

This imports the random module

import random

This line gets the name of both players

p1name = input("Player 1: "); p2name = input("Player 2: ")

This line initializes the scores of both players to 0

p1score = 0; p2score = 0

This sets the first play to player 1

playerTurn = 1

This prints the name of player 1 to begin the game

print(p1name+" starts the game")

This boolean variable roll is set to True.

roll = True

Until roll is updated to False, the following while loop will be repeated

while(roll):

If player turn is 1

   if playerTurn == 1:

This rolls the dice

       p1 = random.randint(1,6)

This prints the outcome of the roll

       print(p1name+"'s roll: "+str(p1))

If the outcome is 1, the turn is passed to player 2

<em>        if p1 == 1:</em>

<em>            playerTurn = 2</em>

<em>            roll = True</em>

If otherwise

       else:

Player 1 score is updated

           p1score+=p1

This asks if player 1 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 2, if otherwise

<em>            if another == "y" or another == "Y":</em>

<em>                roll = True</em>

<em>            else:</em>

<em>                playerTurn = 2</em>

<em>                roll = True</em>

If player turn is 2

   else:

This rolls the dice

       p2 = random.randint(1,6)

This prints the outcome of the roll

       print(p2name+"'s roll: "+str(p2))

If the outcome is 1, the turn is passed to player 1

<em>        if p2 == 1:</em>

<em>            playerTurn = 1</em>

<em>            roll = True</em>

If otherwise

       else:

Player 2 score is updated

           p2score+=p2

This asks if player 2 will take another turn

           another = input("Another Roll (y/n): ")

If yes, the player takes a turn. The turn is passed to player 1, if otherwise

<em>            if another == "y" or another == "Y":</em>

<em>                roll = True</em>

<em>            else:</em>

<em>                playerTurn = 1</em>

<em>                roll = True</em>

If either of both players has scored 50 or above

   if p1score >= 50 or p2score >= 50:

roll is updated to False i.e. the loop ends

       roll = False

This prints the name and scores of each player

print(p1name+":\t"+str(p1score)+"\t"+p2name+":\t"+str(p2score))

7 0
3 years ago
PLEASE HELP!!! <br> Why are Blackberry phones good?
Aleks [24]
The Key2 has excellent build quality, thoughtful software additions and a keyboard that purists will adore. ... Battery life is above average and it runs much faster than the KeyOne, but the BlackBerry Key2 is very much a phone for a select few people who still must have a keyboard – and no one else.
4 0
3 years ago
How to learning algothrim bett
Stells [14]
The GCSE Computing MOOC (created with Cambridge University Press and Raspberry Pi) can be used either as a course or a flexible teaching resource,
8 0
4 years ago
What is the difference between ordered list and unordered list?
VladimirAG [237]

Answer:

In an ordered list, each item is displayed along with the numbers or letters instead of bullets

In an unordered list, each item is displayed with a bullet.

5 0
3 years ago
Other questions:
  • Use a colon before a list and put one space after a colon. True False
    15·2 answers
  • What is the primary purpose of a business plan? To file for incorporation To help you identify your goals and plan how you will
    6·1 answer
  • Tiff is the default file format for most digital cameras. <br> a. True <br> b. False
    12·1 answer
  • Which is most harmful computer virus define​
    15·1 answer
  • we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet scheduling disciplines. Which of these queu
    12·1 answer
  • You have a network of ten computers connected to a single switch that has 12 ports. You need to add six more computers to the ne
    12·1 answer
  • In the context of a global information system (GIS), _____ networks offer electronic data interchange standards, encryption, sec
    10·1 answer
  • Where can you access email accounts on your Windows 7 computer in order to modify current account or create new ones
    15·1 answer
  • Henry is planning to visit Spain for a vacation. He wants to learn Spanish, but he prefers to do it in a fun way. He searches on
    8·2 answers
  • 13. WHICH OF THE FOLLOWING IS INVOLVED IN CREATING A DOCUMENT? *
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!