Answer:
True
Explanation:
SQL stands for structured query language , which is used to query Relational Database Management systems like SQLServer. This is not for writing applications like business layer where we use some programming languages.SQL is meant for data layer to perform CRUD operations against database.
CRUD operations :
Create
Read
Update
Delete
we can perform above operations on database by using SQL query language
Answer:
The correct answer is option (A) 1111
Explanation:
For initial state Q3Q2Q1Q0=0011,
For load = 1 and count = 1 the count is as follows;
1100
1101
1110
1111
Therefore, the maximum count value is 1111
User enters:
lemur parrot cat rock
Outputs:
You have a lemur with a total of 1 pet(s)
You have a parrot with a total of 2 pet(s)
You have a cat with a total of 3 pet(s)
Following are the python program to use the loop to count the number of pets until the user enters the "rock":
c = 0#defining a variable c that initilzes with 0
p = input()#defining a variable p that input value
while p != 'rock':#defining a loop that check p value not equal to rock
c += 1#using c variable for counts total number of pets
print('You have a %s with a total of %d pet(s)' %(p,c))#print total number of pet
p = input() #input value
Output:
Please find the attached file.
Program Explanation:
Find out more about the loop here:
#
#To do this, you want to write a function called
#check_availability. check_availability will have two
#parameters: a list of instances of the Meeting class, and
#proposed_time, a particular date and time.
#
#check_availability should return True (meaning the person
#is available) if there are no instances of Meeting that
#conflict with the proposed_time. In other words, it should
#return False if proposed_time is between the start_time and
#end_time for any meeting in the list of meetings.
#
#The Meeting class is defined below. It has two attributes:
#start_time and end_time. start_time is an instance of the
#datetime class showing when the meeting starts, and
#end_time is an instance of the datetime class indicating
#when the meeting ends.
#
#Hint: Instances of the datetime have at least six
#attributes: year, month, day, hour, minute, and second.
#
#Hint 2: Comparison operators work with instances of the
#datetime class. time_1 < time_2 will be True if time_1 is
#earlier than time_2, and False otherwise.
#
#You should not assume that the list is sorted.
#Here is our definition of the Meeting class:
from datetime import datetime
class Meeting:
def __init__(self, start_time, end_time):
self.start_time = start_time
self.end_time = end_time
#Write your function here!
#Below are some lines of code that will test your function.
#You can change the value of the variable(s) to test your
#function with different inputs.
#
#If your function works correctly, this will originally
#print: True, then False
meetings = [Meeting(datetime(2018, 8, 1, 9, 0, 0), datetime(2018, 8, 1, 11, 0, 0)),
Meeting(datetime(2018, 8, 1, 15, 0, 0), datetime(2018, 8, 1, 16, 0, 0)),
Meeting(datetime(2018, 8, 2, 9, 0, 0), datetime(2018, 8, 2, 10, 0, 0))]
print(check_availability(meetings, datetime(2018, 8, 1, 12, 0, 0)))
print(check_availability(meetings, datetime(2018, 8, 1, 10, 0, 0)))
Answer:
i hope the program below will help you!
Explanation:
Answer:
public class TestSoccerPlayer {
public static void main(String[] args) {
SoccerPlayer playerOne = new SoccerPlayer("Rinco",9,16,22);
System.out.println("The player of the season is "+playerOne.getName()+" His Jessey Number is "+playerOne.getJerseyNum()
+" In the 2019/2020 season he scored and total of "+playerOne.getGoalsScored()+" and "+
playerOne.getAssists()+" Asists");
}
}
See the SoccerPlayer class with the feilds and methods (constructor, getter and setters) in the explanation section
Explanation:
public class SoccerPlayer {
private String name;
private int jerseyNum;
private int goalsScored;
private int assists;
public SoccerPlayer(String name, int jerseyNum, int goalsScored, int assists) {
this.name = name;
this.jerseyNum = jerseyNum;
this.goalsScored = goalsScored;
this.assists = assists;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getJerseyNum() {
return jerseyNum;
}
public void setJerseyNum(int jerseyNum) {
this.jerseyNum = jerseyNum;
}
public int getGoalsScored() {
return goalsScored;
}
public void setGoalsScored(int goalsScored) {
this.goalsScored = goalsScored;
}
public int getAssists() {
return assists;
}
public void setAssists(int assists) {
this.assists = assists;
}
}
Answer:
The solution is provided in the explanation section.
Detailed explanation is provided using comments within the code
Explanation:
import java.util.*;
public class Main {
//The Bubble sort method
public static void bb_Sort(int[] arr) {
int n = 10; //Length of array
int temp = 0; // create a temporal variable
for(int i=0; i < n; i++){
for(int j=1; j < (n-i); j++){
if(arr[j-1] > arr[j]){
// The bubble sort algorithm swaps elements
temp = arr[j-1];
arr[j-1] = arr[j];
arr[j] = temp;
}
}
}
}
public static void main(String[] args) {
//declaring the array of integers
int [] array = new int[10];
//Prompt user to add elements into the array
Scanner in = new Scanner(System.in);
//Use for loop to receive all 10 elements
for(int i = 0; i<array.length; i++){
System.out.println("Enter the next array Element");
array[i] = in.nextInt();
}
//Print the array elements before bubble sort
System.out.println("The Array before bubble sort");
System.out.println(Arrays.toString(array));
//Call bubble sort method
bb_Sort(array);
System.out.println("Array After Bubble Sort");
System.out.println(Arrays.toString(array));
}
}
Answer:
See explaination
Explanation:
void showSeatingChart(string seatingChart[20][40], const int ROWS, const int COLS){
for(int i = 0;i<ROWS;i++){
for(int j = 0;j<COLS;j++){
cout<<seatingChart[i][j]<<" ";
}
cout<<endl;
}
}