I need the SQL statements for these questions:
1. For each reservation, list the reservation ID, trip ID, customer number, and customer last name. Order the results by customer last name.
2. For each reservation for customer Ryan Goff, list the reservation ID, trip ID, and number of persons.
3. List the trip name of each trip that has Miles Abrams as a guide.
4. List the trip name of each trip that has the type Biking and that has Rita Boyers as a guide.
5. For each reservation that has a trip date of July 23, 2016, list the customer’s last name, the trip name, and the start location.
6. List the reservation ID, trip ID, and trip date for reservations for a trip in Maine (ME). Use the IN operator in your query.
7. Repeat Exercise 6, but this time use the EXISTS operator in your query.
8. Find the guide last name and guide first name of all guides who can lead a paddling trip. (Note: The query results should include duplicate values.)
Here are the tables:
CUSTOMER FIRST NAME POSTAL CODE CUSTOMER NUM LAST NAME ADDRESS Northfold Liam 9 Old Mill Rd Londonderry 10 NH 03053 103 Kasuma Sujata 132 Main St. #1 East Hartford CT 06108 MA 01854 Goff 164A South Bend Rd. Lowell Ryan 105 McLean Kyle 345 Lower Ave. Wolcott NY 14590 106 Morontoia Joseph 156 Scholar St Johnston 02919 107 Marchand Quinn 76 Cross Rd Bath NH 03740 108 32 Sheep stop St Edinboro PA Rulf Usch 16412 109 Caron Jean Luc 10 Greenfield St Rome ME 04963 110 Martha York Bers 65 Granite St NY 14592 112 Jones Laura 373 Highland Ave. Somerville MA 02143 115 Nu Adam 1282 Ocean Walk Ocean City Vaccari 08226 116 Murakami Iris 7 Cherry Blossom St. Weymouth MA 02188 119 Londonderry vT Chau 18 Ark Ledge Ln Clement 05148 120 Gernowski Sadie 24 stump Rd. Athens ME 04912 121 Cambridge VT Bretton-Borak Siam 10 Old Main St 122 Hefferson orlagh 132 South St. Apt 27 Manchester NH 03101 123 25 Stag Rd Fairfield Barnett Larry 06824 124 Busa Karen 12 Foster St. South Windsor CT 06074 125 51 Fredrick St Albion Peterson Becca NY 14411 126 Brown Brianne 154 Central St Vernon CT 06066 PHONE Click to Add 603-555-7563 413-555-3212 860-555-0703 781-555-8423 585-555-5321 401-555-4848 603-555-0456 814-555-5521 207-555-9643 585-555-0111 857-555-6258 609-555-5231 617-555-6665 802-555-3096 207-555-4507 802-555-3443 603-555-3476 860-555-9876 857-555-5532. 585-555-0900 860-555-3234

Answers

Answer 1

Answer:

Explanation:

/* From the information provided, For now will consider the name of table as TRIPGUIDES*/

/*In all the answers below, the syntax is based on Oracle SQL. In case of usage of other database queries, answer may vary to some extent*/

1.

Select R.Reservation_ID, R.Trip_ID , C.Customer_Num,C.Last_Name from Reservation R, Customer C where C.Customer_Num=R.Customer_Num ORDER BY C.Last_Name

/*idea is to select the join the two tables by comparing customer_id field in two tables as it is the only field which is common and then print the desired result later ordering by last name to get the results in sorted order*/

2.

Select R.Reservation_ID, R.Trip_ID , R.NUM_PERSONS from Reservation R, Customer C where C.Customer_Num=R.Customer_Num and C.LAST_NAME='Goff' and C.FIRST_NAME='Ryan'

/*Here, the explaination will be similar to the first query. Choose the desired columns from the tables, and join the two tables by equating the common field

*/

3.

Select T.TRIP_NAME from TRIP T,GUIDE G,TRIPGUIDES TG where T.TRIP_ID=TG.TRIP_ID and TG.GUIDE_NUM=G.GUIDE_NUM and G.LAST_NAME='Abrams' and G.FIRST_NAME='Miles'

/*

Here,we choose three tables TRIP,GUIDE and TRIPGUIDES. Here we selected those trips where we have guides as Miles Abrms in the GUIDES table and equated Trip_id from TRIPGUIDES to TRIP.TRIP_Name so that can have the desired results

*/

4.

Select T.TRIP_NAME

from TRIP T,TRIPGUIDES TG ,G.GUIDE

where T.TRIP_ID=TG.TRIP_ID and T.TYPE='Biking' and TG.GUIDE_NUM=G.GUIDE_NUM and G.LAST_NAME='Boyers' and G.FIRST_NAME='Rita'

/*

In the above question, we first selected the trip name from trip table. To put the condition we first make sure that all the three tables are connected properly. In order to do so, we have equated Guide_nums in guide and tripguides. and also equated trip_id in tripguides and trip. Then we equated names from guide tables and type from trip table for the desired results.

*/

5.

SELECT C.LAST_NAME , T.TRIP_NAME , T.START_LOCATION FROM CUSTOMER C, TRIP T, RESERVATION R WHERE R.TRIP_DATE='2016-07-23' AND T.TRIP_ID=R.TRIP_ID AND C.CUSTOMER_NUM=R.CUSTOMER_NUM

/*

The explaination for this one will be equivalent to the previous question where we just equated the desired columns where we equiated the desired columns in respective fields and also equated the common entities like trip ids and customer ids so that can join tables properly

*/

/*The comparison of dates in SQL depends on the format in which they are stored. In the upper case if the

dates are stored in the format as YYYY-MM-DD, then the above query mentioned will work. In case dates are stored in the form of a string then the following query will work.

SELECT C.LAST_NAME , T.TRIP_NAME , T.START_LOCATION FROM CUSTOMER C, TRIP T, RESERVATION R WHERE R.TRIP_DATE='7/23/2016' AND T.TRIP_ID=R.TRIP_ID AND C.CUSTOMER_NUM=R.CUSTOMER_NUM

*/

6.

Select R.RESERVATION_ID, R.TRIP_ID,R.TRIP_DATE FROM RESERVATION R WHERE R.TRIP_ID IN

{SELECT TRIP_ID FROM TRIP T WHERE STATE='ME'}

/*

In the above question, we firstly extracted all the trip id's which are having locations as maine. Now we have the list of all the trip_id's that have location maine. Now we just need to extract the reservation ids for the same which can be trivally done by simply using the in clause stating print all the tuples whose id's are there in the list of inner query. Remember, IN always checks in the set of values.

*/

7.

Select R.RESERVATION_ID, R.TRIP_ID,R.TRIP_DATE FROM RESERVATION WHERE

EXISTS {SELECT TRIP_ID FROM TRIP T WHERE STATE='ME' and R.TRIP_ID=T.TRIP_ID}

/*

Unlike IN, Exist returns either true or false based on existance of any tuple in the condition provided. In the question above, firstly we checked for the possibilities if there is a trip in state ME and TRIP_IDs are common. Then we selected reservation ID, trip ID and Trip dates for all queries that returns true for inner query

*/

8.

SELECT G.LAST_NAME,G.FIRST_NAME FROM GUIDE WHERE G.GUIDE_NUM IN

{

SELECT DISTINCT TG.GUIDE_NUM FROM TRIPGUIDES TG WHERE TG.TRIPID IN {

SELECT T.TRIP_ID FROM TRIP T WHERE T.TYPE='Paddling'

}

}

/*

We have used here double nested IN queries. Firstly we selected all the trips which had paddling type (from the inner most queries). Using the same, we get the list of guides,(basically got the list of guide_numbers) of all the guides eds which were on trips with trip id we got from the inner most queries. Now that we have all the guide_Nums that were on trip with type paddling, we can simply use the query select last name and first name of all the guides which are having guide nums in the list returned by middle query.

*/


Related Questions

Being the Sales Manager of a company you have to hire more salesperson for the company to expand the sales territory. Kindly suggest an effective Recruitment and Selection Process to HR by explaining the all the stages in detail.

Answers

Answer:

1. Identification of a vacancy and development of the job description.

2. Recruitment planning

3. Advertising

4. Assessment and Interview of applicants

5. Selection and Appointment of candidates

6. Onboarding

Explanation:

The Recruitment process refers to all the stages in the planning, assessment, and absorption of candidates in an organization. The stages involved include;

1. Identification of a vacancy and development of the job description: This is the stage where an obvious need in the organization is identified and the duties of the job requirement are stipulated.

2. Recruitment planning: This is the stage where the HR team comes together to discuss the specific ways they can attract qualified candidates for the job.

3. Advertising: The HR team at this point seeks out job sites, newspapers, and other platforms that will make the opportunities accessible to applicants.

4. Assessment and Interview of applicants: Assessments are conducted to gauge the candidates' knowledge and thinking abilities. This will provide insight into their suitability for the job.

5. Selection and Appointment of candidates: Successful candidates are appointed to their respective positions. A letter of appointment is given.

6. Onboarding: Candidates are trained and guided as to the best ways of discharging their duties.

Complete the implementation of the following methods:__init__hasNext()next()getFirstToken()getNextToken()nextChar()skipWhiteSpace()getInteger()

Answers

From method names, I am compelled to believe you are creating some sort of a Lexer object. Generally you implement Lexer with stratified design. First consumption of characters, then tokens (made out of characters), then optionally constructs made out of tokens.

Hope this helps.

Register the countChars event handler to handle the keydown event for the textarea tag. Note: The function counts the number of characters in the textarea.
Do not enter anything in the HTML file, put your code in the JavaScript section where it says "Your solution goes here"
1 klabel for-"userName">user name: 2
3

Answers

Answer:

Explanation:

The following Javascript code is added in the Javascript section where it says "Your solution goes here" and counts the current number of characters in the text within the textArea tag. A preview can be seen in the attached image below. The code grabs the pre-created variable textareaElement and attached the onkeypress event to it. Once a key is pressed it saves the number of characters in a variable and then returns it to the user.

var textareaElement = document.getElementById("userName");

function textChanged(event) {

   document.getElementById("stringLength").innerHTML = event.target.value.length;

}

// Your solution goes here

textareaElement.onkeypress = function() {

   let numOfCharacters = textareaElement.value.length;

   return numOfCharacters;

};

feature of word processing​

Answers

Answer:

the word processing

Explanation:

the word is a good word

Nice word i like processing word feature too i think words are cool

Cardinality ratios often dictate the detailed design of a database. The cardinality ratio depends on the real-world meaning of the entity types involved and is defined by the specific application. For the binary relationships below, suggest cardinality ratios based on the common-sense meaning of the entity types. Clearly state any assumptions you make.
Entity 1 Cardinality Ratio Entity 2
1. Student SocialSecurityCard
2. Student Teacher
3. ClassRoom Wall
4. Country CurrentPresident
5. Course TextBook
6. Item (that can
be found in an
order) Order
7. Student Class
8. Class Instructor
9. Instructor Office
10. E-bay Auction item E-bay bid

Answers

Solution :

ENTITY 1               CARDINALITY RATIO                                     ENTITY 2

1. Student                        1 to many                                     Social security card

                      A student may have more than one          

                     social security card (legally with the

                      same unique social security number),

                     and every social security number belongs

                   to a unique.

2. Student                   Many to Many                                    Teacher

                    Generally students are taught by many

                    teachers and a teacher teaches many students.

3.ClassRoom               Many to Many                                   Wall

                      Do not forget that the wall is usually

                      shared by adjacent rooms.

4. Country                 1 to 1                                             Current President

                       Assuming a normal country under normal

                       circumstances having one president at a

                      time.

5. Course               Many to Many                               TextBook

                        A course may have many textbooks and

                       text book may be prescribed for different

                      courses.

6. Item                             Many to Many                           Order

                        Assuming the same item can appear

                         in different orders.

7. Student                       Many to Many                          Class

                        One student may take several classes.

                        Every class usually has several students.

8. Class                                 Many to 1                             Instructor

                       Assuming that every class has a unique

                        instructor. In case instructors were allowed

                        to team teach, this will be many-many.

9. Instructor                  1 to 1                                             Office

                       Assuming every instructor has only one

                      office and it is not shared. In case of offices

                     shared by 2 instructors, the relationship

                    will be 2-1. Conversely, if any instructor has a joint

                    appointment and offices in both departments,

                    then the relationship will be 1-2. In a very general

                  case, it may be many-many.

10. E-bay Auction item             1-Many                           E-bay bid

                        1 item has many bids and a bid is unique

                        to an item.

discuss the first three phases of program development cycle​

Answers

Answer:

Known as software development life cycle, these steps include planning, analysis, design, development & implementation, testing and maintenance.

____________________ are designed according to a set of constraints that shape the service architecture to emulate the properties of the World Wide Web, resulting in service implementations that rely on the use of core Web technologies (described in the Web Technology section).

Answers

Answer: Web services

Explanation:

Web service refers to a piece of software which uses a XML messaging system that's standardized and makes itself available over the internet.

Web services provides standardized web protocols which are vital for communication and exchange of data messaging throughout the internet.

They are are designed according to a set of constraints which help in shaping the service architecture in order to emulate the properties of the World Wide Web.

Answer:

The correct approach is "REST Services".

Explanation:

It merely offers accessibility to commodities as well as authorization to REST customers but also alters capabilities or sources.

With this technique, all communications are generally assumed to be stateless. It, therefore, indicates that the REST resource actually may keep nothing between runs, which makes it useful for cloud computing.

Write a recursive function that returns 1 if an array of size n is in sorted order and 0 otherwise. Note: If array a stores 3, 6, 7, 7, 12, then isSorted(a, 5) should return 1 . If array b stores 3, 4, 9, 8, then isSorted(b, 4) should return 0.

Answers

Answer:

The function in C++ is as follows:

int isSorted(int ar[], int n){

if ([tex]n == 1[/tex] || [tex]n == 0[/tex]){

 return 1;}

if ([tex]ar[n - 1][/tex] < [tex]ar[n - 2][/tex]){

 return 0;}

return isSorted(ar, n - 1);}

Explanation:

This defines the function

int isSorted(int ar[], int n){

This represents the base case; n = 1 or 0 will return 1 (i.e. the array is sorted)

if ([tex]n == 1[/tex] || [tex]n == 0[/tex]){

 return 1;}

This checks if the current element is less than the previous array element; If yes, the array is not sorted

if ([tex]ar[n - 1][/tex] < [tex]ar[n - 2][/tex]){

 return 0;}

This calls the function, recursively

return isSorted(ar, n - 1);

}

In C language
In a main function declare an array of 1000 ints. Fill up the array with random numbers that represent the rolls of a die.
That means values from 1 to 6. Write a loop that will count how many times each of the values appears in the array of 1000 die rolls.
Use an array of 6 elements to keep track of the counts, as opposed to 6 individual variables.
Print out how many times each value appears in the array. 1 occurs XXX times 2 occurs XXX times
Hint: If you find yourself repeating the same line of code you need to use a loop. If you declare several variables that are almost the same, maybe you need to use an array. count1, count2, count3, count4, … is wrong. Make an array and use the elements of the array as counters. Output the results using a loop with one printf statement. This gets more important when we are rolling 2 dice.

Answers

Answer:

The program in C is as follows:

#include <stdio.h>

#include <stdlib.h>

#include <time.h>

int main(){

   int dice [1000];

   int count [6]={0};

   srand(time(0));

   for (int i = 0; i < 1000; i++) {

       dice[i] = (rand() %(6)) + 1;

       count[dice[i]-1]++;

   }

   for (int i = 0; i < 6; i++) {

       printf("%d %s %d %s",(i+1)," occurs ",count[i]," times");

       printf("\n");

   }

   return 0;

}

Explanation:

This declares an array that hold each outcome

   int dice [1000];

This declares an array that holds the count of each outcome

   int count [6]={0};

This lets the program generate different random numbers

   srand(time(0));

This loop is repeated 1000 times

   for (int i = 0; i < 1000; i++) {

This generates an outcome between 1 and 6 (inclusive)

       dice[i] = (rand() %(6)) + 1;

This counts the occurrence of each outcome

       count[dice[i]-1]++;    }

The following prints the occurrence of each outcome

   for (int i = 0; i < 6; i++) {

       printf("%d %s %d %s",(i+1)," occurs ",count[i]," times");

       printf("\n");    }

Una persona decide comprar un número determinado de quintales de azúcar, ayúdele a presentar el precio de venta al público por libra, considerando un 25% de utilidad por cada quintal.

Answers

I need help with this problem also %


Please help us

how an operating system allocates system resources in a computer​

Answers

Answer:

The Operating System allocates resources when a program need them. When the program terminates, the resources are de-allocated, and allocated to other programs that need them

A _____ is a systematic and methodical evaluation of the exposure of assets to attackers, forces of nature, or any other entity that is a potential harm.

Answers

Answer:

Vulnerability assessment

Explanation:

Cyber security can be defined as preventive practice of protecting computers, software programs, electronic devices, networks, servers and data from potential theft, attack, damage, or unauthorized access by using a body of technology, frameworks, processes and network engineers.

Some examples of cyber attacks are phishing, zero-day exploits, denial of service, man in the middle, cryptojacking, malware, SQL injection, spoofing etc.

A vulnerability assessment is a systematic and methodical evaluation used by network security experts to determine the exposure of network assets such as routers, switches, computer systems, etc., to attackers, forces of nature, or any other entity that is capable of causing harm i.e potential harms. Thus, vulnerability assessment simply analyzes and evaluate the network assets of an individual or business entity in order to gather information on how exposed these assets are to hackers, potential attackers, or other entities that poses a threat.

Assume myString and yourString are variables of type String already declared and initialized. Write ONE line of code that sets yourString to the first character and the last character of myString added to myString variable.

Answers

Answer:

line of code :

newString=myString+myString.charAt(0)+myString.charAt(myString.length()-1);

Explanation:

In Java, the + is used for concatenation

method

charAt() will return the character from the given index from string

myString.charAt(0) will return E

myString.charAt(myString.length()-1)

Jessica sees a search ad on her mobile phone for a restaurant. A button on the ad allows Jessica to click on the button and call the restaurant. This is a(n) Group of answer choices product listing ad (PLA) dynamic keyword insertion ad (DKI) click-to-call ad call-to-action ad (CTA)

Answers

It’s a click-to-call ad

When she manages a software development project, Candace uses a program called __________, because it supports a number of programming languages including C, C , C

Answers

Answer:

PLS programming language supporting.

Explanation:

When she manages a software development project, Candace uses a program called PLS programming language supporting.

What is a software development project?

Software development project is the project that is undertaken by the team of experts that developed through different format of coding language. The software development has specific time, budget, and resources.

Thus, it is PLS programming language

For more details about Software development project, click here:

https://brainly.com/question/14228553

#SPJ2

How can I pass the variable argument list passed to one function to another function.

Answers

Answer:

Explanation:

#include <stdarg.h>  

main()  

{  

display("Hello", 4, 12, 13, 14, 44);  

}  

display(char *s,...)  

{  

va_list ptr;  

va_start(ptr, s);  

show(s,ptr);  

}  

show(char *t, va_list ptr1)  

{  

int a, n, i;  

a=va_arg(ptr1, int);  

for(i=0; i<a; i++)  

 {  

n=va_arg(ptr1, int);  

printf("\n%d", n);  

}  

}

Define a class named Point with two data fields x and y to represent a point's x- and y-coordinates. Implement the Comparable interface for the comparing the points on x-coordinates. If two points have the same x-coordinates, compare their y-coordinates. Define a class named CompareY that implements Comparator. Implement the compare method to compare two points on their y-coordinates. If two points have the same y-coordinates, compare their x-coordinates. Randomly create 100 points and apply the Arrays.sort method to display the points in increasing order of their x-coordinates, and increasing order of their y-coordinates, respectively.

Answers

Answer:

Here the code is given in java as follows,

A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single statement that assigns num_ones with the number of distributed one-dollar bills given amount_to_change. Hint: Use %.
Sample output with input: 19
Change for $ 19
3 five dollar bill(s) and 4 one dollar bill(s)
1 amount_to_change = int(input())
2
3 num_fives amount_to_change // 5
4
5 Your solution goes here
6 I
7 print('Change for $, amount_to_change)
8 print(num_fives, 'five dollar bill(s) and', num_ones, 'one dollar bill (s)')

Answers

Answer:

Explanation:

The code that was provided in the question contained a couple of bugs. These bugs were fixed and the new code can be seen below as well as with the solution for the number of one-dollar bills included. The program was tested and the output can be seen in the attached image below highlighted in red.

amount_to_change = int(input())

num_fives = amount_to_change // 5

#Your solution goes here

num_ones = amount_to_change % 5

print('Change for $' + str(amount_to_change))

print(num_fives, 'five dollar bill(s) and', num_ones, 'one dollar bill (s)')

Analyze the following code:
// Enter an integer Scanner input = new Scanner(System.in);
int number = input.nextInt(); if (number <= 0) System.out.println(number);
1) The if statement is wrong, because it does not have the else clause;
2) System.out.println(number); must be placed inside braces;
3) If number is zero, number is displayed;
4) If number is positive, number is displayed.
5) number entered from the input cannot be negative.

Answers

Answer:

3) If number is zero, number is displayed;

Explanation:

The code snippet created is supposed to take any input number from the user (positive or negative) and print it to the console if it is less than 0. In this code the IF statement does not need an else clause and will work regardless. The System.out.println() statement does not need to be inside braces since it is a simple one line statement. Therefore, the only statement in the question that is actually true would be ...

3) If number is zero, number is displayed;

Answer:

If number is zero, number is displayed

Explanation:

Given

The above code segment

Required

What is true about the code segment

Analyzing the options, we have:

(1) Wrong statement because there is no else clause

The above statement is not a requirement for an if statement to be valid; i.e. an if statement can stand alone in a program

Hence, (1) is false

(2) The print statement must be in { }

There is only one statement (i.e. the print statement) after the if clause. Since the statement is just one, then the print statement does not have to be in {} to be valid.

Hence, (2) is false

(3) number is displayed, if input is 0

In the analysis of the program, we have: number <=0

i.e. the if statement is true for only inputs less than 0 or 0.

Hence, number will be printed and (3) is false

(4) number is displayed for positive inputs

The valid inputs have been explained in (3) above;

Hence, (4) is false.

(5) is also false

what operation can be performed using the total feature ​

Answers

They can do different surgery on people. One is called cataract total and hip replacement surgery which is what can be expected

Suppose that a queue is implemented using a circular array of size 12. What is the value of last after the following operations?
10 enqueue operations
5 dequeue operations
6 enqueue operations
10 dequeue operations
8 enqueue operations
2 dequeue operations
3 enqueue operations
Last = 10

Answers

Answer:

10

Explanation:

An enqueue operation is a function that adds an element(value) to a queue array. A dequeue operations removes an element from a queue array. Queue arrays follow a first-in-first-out approach, so elements that are first stored in the queue are removed/accessed first(enqueue operations add elements at the rear of the queue array).

The following operations leave 10 elements in the queue of array size 12 after its done:

10 enqueue operations= adds 10 elements

5 dequeue operations= removes 5 elements( 5 elements left in queue)

6 enqueue operations= adds 6 elements(11 elements in queue)

10 dequeue operations= removes 10 elements(1 element left in queue)

8 enqueue operations= adds 8 elements(9 elements in queue)

2 dequeue operations= removes 2 elements(7 elements left in queue)

3 enqueue operations= adds 3 elements(10 elements in queue)

Therefore there are 10 elements in the queue after enqueue and dequeue operations.

Fill in multiple blanks for [x], [y], [z]. Consider a given TCP connection between host A and host B. Host B has received all from A all bytes up to and including byte number 2000. Suppose host A then sends three segments to host B back-to-back. The first, second and third segments contain 50, 600 and 100 bytes of user data respectively. In the first segment, the sequence number is 2001, the source port number is 80, and the destination port number is 12000. If the first segment, then third segment, then second segment arrive at host B in that order, consider the acknowledgment sent by B in response to receiving the third segment. What is the acknowledgement number [x], source port number [y] and destination port number [z] of that acknowledgement

Answers

b _ i did this already

write short note on the following: Digital computer, Analog Computer and hybrid computer​

Answers

Answer:

Hybrid Computer has features of both analogue and digital computer. It is fast like analogue computer and has memory and accuracy like digital computers. It can process both continuous and discrete data. So it is widely used in specialized applications where both analogue and digital data is processed.

what is a mirror site?

Answers

Mirror sites or mirrors are replicas of other websites or any network node. The concept of mirroring applies to network services accessible through any protocol, such as HTTP or FTP. Such sites have different URLs than the original site, but host identical or near-identical content.
ANSWER: Mirror sites, often known as mirrors, are exact copies of other websites or network nodes.

what is the process by which we can control what parts of a program can acccess the members of class

Answers

Answer:

Encapsulation.

Explanation:

Information hiding involves using private fields within classes and it's a feature found in all object-oriented languages such as Java, Python, C#, Ruby etc.

In object-oriented programming language, a process known as encapsulation is used for the restrictions of the internal data of a software program from the outside code, therefore preventing an unauthorized direct access to the codes. This is achieved through the use of classes.

In Computer programming, class members can be defined as the members of a class that typically represents or indicates the behavior and data contained in a class.

Basically, the members of a class are declared in a class, as well as all classes in its inheritance hierarchy except for destructors and constructors.

In a class, member variables are mainly known as its attributes while its member function are seldomly referred to as its methods or behaviors.

One of the main benefits and importance of using classes is that classes helps to protect and safely guard their member variables and methods by controlling access from other objects.

Therefore, the class members which should be declared as public are methods and occasionally final attributes because a public access modifier can be accessed from anywhere such as within the current or external assembly, as there are no restrictions on its access.

Assign courseStudent's name with Smith, age with 20, and ID with 9999. Use the print member function and a separate cout statement to output courseStudents's data. End with a newline. Sample output from the given program:
#include
#include
using namespace std;
class PersonData {
public:
void SetName(string userName) {
lastName = userName;
};
void SetAge(int numYears) {
ageYears = numYears;
};
// Other parts omitted
void PrintAll() {
cout << "Name: " << lastName;
cout << ", Age: " << ageYears;
};
private:
int ageYears;
string lastName;
};
class StudentData: public PersonData {
public:
void SetID(int studentId) {
idNum = studentId;
};
int GetID() {
return idNum;
};
private:
int idNum;
};
int main() {
StudentData courseStudent;
/* Your solution goes here */
return 0;
}

Answers

Answer:

Replace /* Your solution goes here */

with the following:

courseStudent.SetName("Smith");

courseStudent.SetAge(20);

courseStudent.SetID(9999);

courseStudent.PrintAll();

cout <<courseStudent.GetID();

Explanation:

From the given code segment, we have the following methods defined under the StudentData class;

SetName -> It receives name from the main

SetAge -> It receives age from the main

SetID --> It receives ID from the main and passes it to GetID method

printID --> Prints all the required output.

So, we have:

Pass name to setName

courseStudent.SetName("Smith");

Pass age to setAge

courseStudent.SetAge(20);

Pass ID to setID

courseStudent.SetID(9999);

Print all necessary outputs

courseStudent.PrintAll();

Manually print the student ID

cout <<courseStudent.GetID();

Which of the following financial functions can you use to calculate the payments to repay your loan

Answers

Answer:

PMT function. PMT, one of the financial functions, calculates the payment for a loan based on constant payments and a constant interest rate. Use the Excel Formula Coach to figure out a monthly loan payment.

Explanation:

A security administrator currently spends a large amount of time on common security tasks, such aa report generation, phishing investigations, and user provisioning and deprovisioning This prevents the administrator from spending time on other security projects. The business does not have the budget to add more staff members.
Which of the following should the administrator implement?
A. DAC
B. ABAC
C. SCAP
D. SOAR

Answers

Answer: SOAR

Explanation:

SOAR (security orchestration, automation and response) refers to compatible software programs wfuvg allows an organization to collect data that has to do with security threats and also enables them respond to security events without the needs of a human assistance.

Since the administrator doesn't have time on other security projects, the SOAR will be vital in this regard.

Write a program in c++ that will:1. Call a function to input temperatures for consecutive days in 1D array. NOTE: The temperatures will be integer numbers. There will be no more than 10 temperatures.The user will input the number of temperatures to be read. There will be no more than 10 temperatures.2. Call a function to sort the array by ascending order. You can use any sorting algorithm you wish as long as you can explain it.3. Call a function that will return the average of the temperatures. The average should be displayed to two decimal places.Sample Run:Please input the number of temperatures to be read5Input temperature 1:68Input temperature 2:75Input temperature 3:36Input temperature 4:91Input temperature 5:84Sorted temperature array in ascending order is 36 68 75 84 91The average temperature is 70.80The highest temperature is 91.00The lowest temperature is 36.00

Answers

Answer:

The program in C++ is as follows:

#include <iostream>

#include <iomanip>

using namespace std;

int* sortArray(int temp [], int n){

   int tmp;

   for(int i = 0;i < n-1;i++){

 for (int j = i + 1;j < n;j++){

  if (temp[i] > temp[j]){

   tmp  = temp[i];

   temp[i] = temp[j];

   temp[j] = tmp;   }  } }

return temp;

}

float average(int temp [], int n){

   float sum = 0;

   for(int i = 0; i<n;i++){

       sum+=temp[i];    }

   return sum/n;

}

int main(){

   int n;

   cout<<"Number of temperatures: ";    cin>>n;

   while(n>10){

       cout<<"Number of temperatures: ";    cin>>n;    }

   int temp[n];

   for(int i = 0; i<n;i++){

       cout<<"Input temperature "<<i+1<<": ";

       cin>>temp[i];    }

   int *sorted = sortArray(temp, n);

   cout<<"The sorted temperature in ascending order: ";

   for( int i = 0; i < n; i++ ) {  cout << *(sorted + i) << " ";   }

   cout<<endl;

   float ave = average(temp,n);

   cout<<"Average Temperature: "<<setprecision(2)<<ave<<endl;

   cout<<"Highest Temperature: "<<*(sorted + n - 1)<<endl;

   cout<<"Lowest Temperature: "<<*(sorted + 0)<<endl;

   return 0;

}

Explanation:

See attachment for complete source file with explanation

Long Answer Questions: a. Briefly explain the types of Control Structures in QBASIC.​

Answers

Answer:

The three basic types of control structures are sequential, selection and iteration. They can be combined in any way to solve a specified problem. Sequential is the default control structure, statements are executed line by line in the order in which they appear.

Other Questions
Bribes or kickbacks of any kind for services that are paid under a Federal health care program (which includes Medicare) constitute fraud by the person making as well as the person receiving them. Karen decides to wake up 2 hours earlier to study with the expectation of raising her grade to a B. Do you agree with that decision? Why or why not? (Use the chart to answer the questions Our Moon a. was a separate small planet before it was captured by the Earth's gravity. b. spun off the fast-spinning Earth during the early formation of the Solar System. c. coalesced from gas and dust in its current place next to the Earth. d. was formed by the collision of the Earth with a Mars-sized protoplanet. There were a (pare, pair, pear) of students that were always falling asleep during lectures. Of course, they failed miserably and lost their financial aid. CaCO3 + 2HCl > CaCl2 + CO + HO HELPPP! Pleaze I will give 30 points! Triangle XYZ has vertices at X(-2, 3), Y(3, 0), and Z(2, 1). What are the coordinates of the image of Triangle XYZ after the translation (x, y) --> (x + 3, y + 1)? The 12th term of the arithmetic sequence is 10.5. The 18th term of this sequence is 13.5. Find the common difference and the first term. Please help answer all these questions. I will give brainliest questions aint in order if you feel unsafe in your environment it cannot affect your self concept Find the FACTORS of36 whats the value of x in the formula x = 2(alb) - 4c if a = 12, b =3, and a c=1? oil-rich countries in the middle east cover about 4% of earth's total land area but posses about 48% of the world's known oil reserves. what is the main reason for high concentration of reserves in this part of the world? Please help solve this!! NO LINKS, ASAP, WILL GIVE BRAIN THING Instructions: Find the missing side. Round your answer to the nearest tenth.2258 Which sentence has grammatical or spelling errors?If we find that we should've shipped your order sooner, you'll be eligible fora full refund.When they finished eating, all of the boy's faces were covered in tomatosauce. 3. A 3D model of a designed product would be used to communicate the What is the y value when x is -5? What about 5?Ive done all three functions and the answers are -9, 24 and -4 but I dont know which one to answer as the y value with. Please help. Ht nhn nguyn t c to bi A photon has an energy of 2.0910^-18 kJ .What is its wavelength? 3(t-3)=5(2t+1) solve the following linear equations