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
Eva8 [605]
3 years ago
10

Does this Java Program look correct? First, let me paste the question:Five friends are going to the theater. They have purchased

a row of five seats with an aisle on either end.James doesn't want to sit next to JillBetty and Herb are dating and want to sit next to each otherBob must sit on an aisleProvide a seating order that conforms to the above rules. An example of an invalid seating order is:James, Betty, Herb, Bob, JillThe above arrangement is invalid because: Bob is not sitting on an aisle.Specify the seating order as the names separated by commas (as in the above example). Please be sure to spell the names correctly, including capitalization.My Program:public class Seating{ public static void main (String [] args){ String James; String Jill; String Betty; String Herb; String Bob; system.output.println(Bob + "," + Jill + "," + Herb + "," + Betty + "," + James + "."; }}
Computers and Technology
1 answer:
atroni [7]3 years ago
4 0

Answer:

Your program is correct.

Explanation:

<u>You have this requeriments:</u>

  • James doesn't want to sit next to Jill.
  • Betty and Herb are dating and want to sit next to each other.
  • Bob must sit on an aisle.
  • Aisle on either end.

<u>Your answer:</u>

public class Seating{

public static void main (String [] args)

{ String James;

String Jill;

String Betty;

String Herb;

String Bob;

system.output.println(Bob + "," + Jill + "," + Herb + "," + Betty + "," + James + "."; } <em>//Bob is an aisle. James is not sit next to Jill. Betty and Herb are sit together.</em>

}

You might be interested in
Discuss any five positive and five Negative impact<br>of ICT on society​
mojhsa [17]

Answer:

The technology of information communication has the capacity to transform society. It plays a key part and provides the infrastructure needed to achieve each of the United Nations Sustainable Development Goals. It also allows financial integration by m-commerce and lets people connect instantly to millions.

ICT has a particularly important impact on business. It allows people to exchange knowledge and advice immediately and establish a website or online shop at a low cost, thus reducing the obstacles to starting a business dramatically. As such, it is a major factor in change and the maturity of ICTs is strongly connected to economic growth.

Explanation:

Effects of ICT

As a human beings, we are always associated in our everyday life with many essential things. The use of ICT equipment in our lifestyle has simplified many time-consuming calculations and difficult tasks, and social contacts have been strengthened. ICT has affected life by enhancing the timely distribution of media information and improved home and workplace communications via social networking, e-mail, etc.

The quality of human life has been greatly improved by ICT. For example, it could take a few days for a letter to come to the recipient, but a single minute for an e-mail to reach. ICT offers a broader understanding and information for each facility  24 Hrs X 7 days. In the following, ICT affects different fields of daily living.

Positive Impacts of ICT:

  • As domestic and home businesses.
  • As social connectivity.
  • As E-learning/ As education
  • As for shopping/trading
  • As for banks
  • As a job/jobs

Negative Impacts of ICT:

  • Face-to-face interaction reduced.
  • Social Decoupling.
  • Physical activity/health issues reduced.
  • Cost.

4 0
3 years ago
A(n) ____ is a secure, private path across a public network that is set up to allow authorized users private, secure access to t
yKpoI14uk [10]
It's VPN(Virtual Private Network). It allows company to have private network at the same time secure. While others are not that secure.
4 0
3 years ago
Use BlueJ to write a program that reads a sequence of data for several car objects from an input file. It stores the data in an
vaieri [72.5K]

Answer:

Java code is explained below

Explanation:

// Car.java

import java.util.Calendar;

public class Car {

  private String vin;

  private String make;

  private String model;

  private double cost;

  private int year;

  public Car(String vin, String make, String model, double cost, int year) {

      this.vin = vin;

      this.make = make;

      this.model = model;

      this.cost = cost;

      this.year = year;

  }

  public String getModel() {

      return model;

  }

  public double getCost() // returns car’s cost

  {

      return cost;

  }

  public String getMake() // returns car’s make

  {

      return make;

  }

  public boolean isExpensive() // returns true if car has cost above 30000 and

                                  // false

  // otherwise

  {

      if (cost > 30000)

          return true;

      else

          return false;

  }

  public boolean isAntique() // returns true if car’s has above 50 years, and

                              // false

  // otherwise

  {

      int cyear = Calendar.getInstance().get(Calendar.YEAR);

      if ((cyear-year) > 50)

          return true;

      else

          return false;

  }

  public String toString() // returns string with all car’s data in one line

  // separated by tabs.

  {

      return vin + "\t" + make + "\t" + model + " " + cost + "\t" + year;

  }

}

___________________________

// CarList.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.ArrayList;

import java.util.Scanner;

public class CarList {

  private ArrayList<Car> type;

  public CarList() throws FileNotFoundException {

      this.type = new ArrayList<Car>();

      Scanner sc1 = new Scanner(new File("inData.txt"));

      while (sc1.hasNextLine()) {

          String str = sc1.nextLine();

          String arr[] = str.split(" ");

          type.add(new Car(arr[0], arr[1], arr[2], Integer.parseInt(arr[3]),

                  Integer.parseInt(arr[4])));

      }

      sc1.close();

  }

 

  public void printList()

  {

      System.out.println("Displaying cars:");

      for(int i=0;i<type.size();i++)

      {

          System.out.println(type.get(i));

      }

  }

  public void printExpensiveCars()

  {

     

      System.out.println("List of expensive cars:");

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).isExpensive())

          {

              System.out.println(type.get(i));

          }

      }

  }

 

  public Car cheapestCar()

  {

      int cheapIndx=0;

      double min=type.get(0).getCost();

      for(int i=0;i<type.size();i++)

      {

      if(min>type.get(i).getCost())

      {

          min=type.get(i).getCost();

          cheapIndx=i;

      }

      }

      return type.get(cheapIndx);

  }

  public int countCarsWithModel(String model)

  {

      int cnt=0;

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).getModel().equals(model))

          {

              cnt++;

          }

      }

      return cnt;

  }

 

  public ArrayList<Car> antiqueCarList ()

  {

      ArrayList<Car> arl=new ArrayList<Car>();

      for(int i=0;i<type.size();i++)

      {

          if(type.get(i).isAntique())

          arl.add(type.get(i));

      }

      return arl;

  }

}

_________________________________

// TestCarList.java

import java.io.File;

import java.io.FileNotFoundException;

import java.util.ArrayList;

import java.util.Scanner;

public class TestCarList {

  public static void main(String[] args) throws FileNotFoundException {

      CarList cl = new CarList();

      cl.printList();

      cl.printExpensiveCars();

      ArrayList arl = cl.antiqueCarList();

      System.out.println("Displaying the AntiqueCar list:");

      for (int i = 0; i < arl.size(); i++) {

          System.out.println(arl.get(i));

      }

      System.out.println("Displaying the cheapest car :");

      System.out.println(cl.cheapestCar());

      System.out.println("No of Royal model Cars :"+ cl.countCarsWithModel("Royal"));

  }

}

____________________________

Output:

Displaying cars:

1234567CS2   Subaru   Impreza 27000.0   2017

1233219CS2   Toyota   Camry 31000.0   2010

9876543CS2   Ford   Mustang 51000.0   1968

3456789CS2   Toyota   Tercel 20000.0   2004

4567890CS2   Crysler   Royal 11000.0   1951

List of expensive cars:

1233219CS2   Toyota   Camry 31000.0   2010

9876543CS2   Ford   Mustang 51000.0   1968

Displaying the AntiqueCar list:

9876543CS2   Ford   Mustang 51000.0   1968

4567890CS2   Crysler   Royal 11000.0   1951

Displaying the cheapest car :

4567890CS2   Crysler   Royal 11000.0   1951

No of Royal model Cars :1

3 0
3 years ago
Marx and engels identified two social classes: the ______ who possess the means of production and ______ who must do all the wor
Morgarella [4.7K]

Marx and Engels identified two social classes: the exploiters who possess the means of production and exploited  who must do all the work.

<h3>What is a Social class?</h3>

A social class is known to be a kind of a grouping of people and it is one that is made where people are said to be shared into a set of hierarchical social stages  or groups.

Note that the most common are the upper, middle and lower classes. Membership in a social class is seen to be based on  or dependent on education, wealth, occupation, and others.

Hence, Marx and Engels identified two social classes: the exploiterswho possess the means of production and exploited  who must do all the work.

Learn more about social classes from

brainly.com/question/1065123

#SPJ1

8 0
2 years ago
Assume a 15 cm diameter wafer has a cost of 12, contains 84 dies, and has0.020 defects /cm2Assume a 20 cm diameter wafer has a c
Vitek1552 [10]

Answer:

1. yield_1=0.959 and yield_2=0.909

2. Cost_1=0.148 and Cost_2=0.165

3. New area per die=1.912 cm^2 and yield_1=0.957

   New area per die=2.85 cm^2  and yield_2=0.905

4. defects=0.042 per cm^2 and defects=0.026 per cm^2

Explanation:

1. Find the yield for both wafers.

yield= 1/(1+(defects per unit area*dies per unit area/2))^2

Wafer 1:

Radius=Diameter/2=15/2=7.5 cm

Total Area=pi*r^2=pi(7.5)^2=176.71 cm^2

Area per die= 176.71/84=2.1 cm^2

yield_1= 1/(1+(0.020*2.1/2))^2

yield_1=1/1.04244=0.959

Wafer 2:

Radius=Diameter/2=20/2=10 cm

Total Area=pi*r^2=pi(10)^2=314.159 cm^2

Area per die= 314.159/100=3.14 cm^2

yield_2= 1/(1+(0.031*3.14/2))^2

yield_2=1/1.0997=0.909

2. Find the cost per die for both wafers.

Cost per die= cost per wafer/Dies per wafer*yield

Wafer 1:

Cost_1=12/84*0.959=0.148

Wafer 2:

Cost_2=15/100*0.909=0.165

3. If the number of dies per wafer is increased by 10% and the defects per area unit increases by 15%, find the die area and yield.

Wafer 1:

There is a 10% increase in the number of dies

10% of 84 =8.4

New number of dies=84.4+8=92.4

There is a 15% increase in the defects per cm^2

15% of 0.020=0.003

New defects per area= 0.020 + 0.003=0.023 defects per cm^2

New area per die= 176.71/92.4=1.912 cm^2

yield_1= 1/(1+(0.023*1.912/2))^2=0.957

Wafer 2:

There is a 10% increase in the number of dies

10% of 100=10

New number of dies=100+10=110

There is a 15% increase in the defects per cm^2

15% of 0.031=0.0046

New defects per area= 0.031 + 0.00465=0.0356 defects per cm^2

New area per die= 314.159/110=2.85 cm^2

yield_2= 1/(1+(0.0356*2.85/2))^2=0.905

4. Assume a fabrication process improves the yield from 0.92 to 0.95. Find the defects per area unit for each version of the technology given a die area of

Assuming a die area of 2cm^2

We have to find the defects per unit area for a yield of 0.92 and 0.95

Rearranging the yield equation,

yield= 1/(1+(defects*die area/2))^2

defects=2*(1/sqrt(yield) - 1)/die area

For 0.92 technology

defects=2*(1/sqrt(0.92) - 1)/2

defects=0.042 per cm^2

For 0.95 technology

defects=2*(1/sqrt(0.95) - 1)/2

defects=0.026 per cm^2

6 0
3 years ago
Other questions:
  • • Write a program to find the maximum, minimum, and average score of players. The input to the program is a file containing play
    9·1 answer
  • Windows domain policy to disable windows 10 update
    7·1 answer
  • Assume you're using a three button mouse. to access shortcut menus, you would
    9·2 answers
  • TIFF is the default file format for most digital cameras. State True or False.
    13·1 answer
  • Explain SATA peripheral bus operation?
    14·1 answer
  • The radix sort
    14·1 answer
  • Technician A says that the reserve rating of a battery is the amount of steady current that a fully charged battery can supply f
    6·1 answer
  • If a large organization wants software that will benefit the entire organization—what's known as enterprise application software
    7·1 answer
  • Krya needs help deciding which colors she should use on her web page. What can she use to help her decide.
    11·1 answer
  • What is a method that deletes an item from a list using the item’s value?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!