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
Ratling [72]
3 years ago
9

Task 1

Computers and Technology
1 answer:
EleoNora [17]3 years ago
5 0

Answer: yes they do

Explanation: they both show the same references.

You might be interested in
Create a TeeShirt class for Toby’s Tee Shirt Company. Fields include:
Ainat [17]

Answer:

Here is the TeeShirt class:

public class TeeShirt{  //class name

   private int orderNumber;  // private member variable of type int of class TeeShirt to store the order number

   private String size;  // to store the size of tshirt

   private String color;  //  to store the color of shirt

   private double price;  // to store the price of shirt

   public void setOrderNumber(int num){  //mutator method to set the order number

       orderNumber = num;     }    

   public void setColor(String color){  //mutator method to set the color

       this.color = color;        }      

       

     public void setSize(String sz){  //mutator method to set the shirt size

   size = sz;  

   if(size.equals("XXXL") || size.equals("XXL")){  //if shirt size is XXL or XXXL

       price = 22.99;  // set the price to 22.99 if shirt size is XXL or XXXL

   }else{  //for all other sizes of shirt

       price = 19.99;     }  }  //sets the price to 19.99 for other sizes

   public int getOrderNumber(){  //accessor method to get the order number stored in orderNumber field

       return orderNumber;     }  //returns the current orderNumber

   public String getSize(){  //accessor method to get the size stored in size field

       return size;     }  //returns the current size

   public String getColor(){  //accessor method to get the color stored in color field

       return color;     }  //returns the current color

   public double getPrice(){  //accessor method to get the price stored in price field

       return price;      }  } //returns the current price

Explanation:

Here is the sub class CustomTee:

public class CustomTee extends TeeShirt {  //class CustomTee that inherits from class TeeShirt

private String slogan;   //private member variable of type String of class CustomTee to store slogan

public void setSlogan(String slgn) {  //mutator method to set the slogan

slogan = slgn; }

public String getSlogan() {  //accessor method to get the slogan stored in slogan field

return slogan;}  } //returns the current slogan

Here is DemoTees.java

import java.util.*;

public class DemoTees{  //class name

public static void main(String[] args)  {  //start of main method

TeeShirt tee1 = new TeeShirt();  //creates object of class TeeShirt named tee1

TeeShirt tee2 = new TeeShirt(); //creates object of class TeeShirt named tee2

CustomTee tee3 = new CustomTee(); //creates object of class CustomTee named tee3

CustomTee tee4 = new CustomTee();  //creates object of class CustomTee named tee4

tee1.setOrderNumber(100);  //calls setOrderNumber method of class TeeShirt using object tee1 to set orderNumber to 100

tee1.setSize("XXL");  //calls setSize method of class TeeShirt using object tee1 to set size to XXL

tee1.setColor("blue");  //calls setColor method of class TeeShirt using object tee1 to set color to blue

tee2.setOrderNumber(101);  //calls setOrderNumber method of class TeeShirt using object tee2 to set orderNumber to 101

tee2.setSize("S");  //calls setSize method of class TeeShirt using object tee2 to set size to S

tee2.setColor("gray");  //calls setColor method of class TeeShirt using object tee2 to set color to gray

tee3.setOrderNumber(102);   //calls setOrderNumber method of class TeeShirt using object tee3 of class CustomTee to set orderNumber to 102

tee3.setSize("L");  //calls setSize method of class TeeShirt using object tee3 to set size to L

tee3.setColor("red");  //calls setColor method of class TeeShirt using object tee3 to set color to red

tee3.setSlogan("Born to have fun");  //calls setSlogan method of class CustomTee using tee3 object to set the slogan to Born to have fun

tee4.setOrderNumber(104);  //calls setOrderNumber method of class TeeShirt using object tee4 of class CustomTee to set orderNumber to 104

tee4.setSize("XXXL");  //calls setSize method to set size to XXXL

tee4.setColor("black");  //calls setColor method to set color to black

tee4.setSlogan("Wilson for Mayor");  //calls setSlogan method to set the slogan to Wilson for Mayor

display(tee1);  //calls this method passing object tee1

display(tee2);  //calls this method passing object tee2

displayCustomData(tee3);  //calls this method passing object tee3

displayCustomData(tee4);  }   //calls this method passing object tee4

public static void display(TeeShirt tee) {  //method display that takes object of TeeShirt as parameter

System.out.println("Order #" + tee.getOrderNumber());  //displays the value of orderNumber by calling getOrderNumber method using object tee

System.out.println(" Description: " + tee.getSize() +  " " + tee.getColor());  //displays the values of size and color by calling methods getSize and getColor using object tee

System.out.println(" Price: $" + tee.getPrice()); }  //displays the value of price by calling getPrice method using object tee

public static void displayCustomData(CustomTee tee) {  //method displayCustomData that takes object of CustomTee as parameter

display(tee);  //displays the orderNumber size color and price by calling display method and passing object tee to it

System.out.println(" Slogan: " + tee.getSlogan());  } } //displays the value of slogan by calling getSlogan method using object tee

5 0
2 years ago
g Write an SQL statement to list all of the names of students who have not taken a classwith an instructorwho is a faculty of th
iogann1982 [59]

Answer:

SELECT StudentFullname FROM Studentdata INNER JOIN Student_Class ON Studentdata.uniqueno = Student_Class.student_id LEFT JOIN Student_Instructor ON Student_Class.instructor_id = Student_Instructor.id WHERE Student_Instructor.faculty <> 'Computer Science'

Explanation:

Assume the following table names;

Studentdata - for student table

Student_Class - for each class

Student_Instructor - for student's instructors

The code first list out StudentFullname from studentdata table.

The code is the connected to Student_Class to get a list of students in class

The code is then connected to Student_Instructor table to get a list of instructors in class

Lastly, the where then filters instructors that are not from computer science department

4 0
3 years ago
Iisa is creating a resume in which section should she mention her career goals
spayn [35]
Objective (sometimes called objective selection)
8 0
3 years ago
Choose which three values should replace the blanks in the for loop so that it loops through the numbers: 3 6 9 12 15.
mestny [16]

Answer:

3, <= 15, +=3

Explanation:

Required.

Fill in the gaps

The given code snippet written in Java programming language is an iterative statement that prints from 3 to 15 (both inclusive) with an increment of 3.

This means that, the beginning of the loop is 3 and is represented by i = 3

Also, the end is 15 and this can be represented by i<=15.

This means that all numbers less than or equal to 15 be printed

And the increment is 3.

This can be represented in two ways.

i+=3 or i = i + 3

But as used in the options, we go with i+=3

This means that each interval is separated by 3

So, the loop when filled with the above statements is:

for(int i = 3; i <=15; i+=3)

{

System.out.print(i+" ");

}

7 0
2 years ago
A(n) _____ is often used so remote users have a secure connection to an organization’s network.
LekaFEV [45]
VPN ( Virtual Private Network) with or without RSA Token
5 0
2 years ago
Read 2 more answers
Other questions:
  • Interpretations of​ Moore's law assert​ that:
    13·1 answer
  • Which of the following websites can help you learn about general career trends?
    13·1 answer
  • Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
    10·1 answer
  • How does abstraction help us write programs
    11·1 answer
  • Which option correctly identifies if the researcher’s approach was the best choice in the following scenario and explains why?
    10·2 answers
  • How can you make a search phrase more effective?
    11·1 answer
  • Write a python program to find the Area of Circle!<br>GRADE 8 CBSE​
    15·1 answer
  • 8. This machine is used for high speed, high volume printing l. Can print about 1000 papers at one point in time.
    12·1 answer
  • What is the advantage of entering metadata for electronic records that you create
    7·1 answer
  • Write a complete program that declares an integer variable
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!