answer.
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
Masteriza [31]
2 years ago
5

Now that the classList Array has been implemented, we need to create methods to access the list items.

Computers and Technology
1 answer:
natima [27]2 years ago
7 0

The following code will be applied to Create the following static methods for the Student class

<u>Explanation:</u>

/* Note: Array index starts from 0 in java so ,, user ask for 1 index then the position will be i-1 , below program is based on this concept if you dont want this way just remove -1 from classList.get(i-1).getName(); ,and classList.add(i-1,student); */

/* ClassListTester.java */

public class ClassListTester

{

public static void main(String[] args)

{

//You don't need to change anything here, but feel free to add more Students!

Student alan = new Student("Alan", 11);

Student kevin = new Student("Kevin", 10);

Student annie = new Student("Annie", 12);

System.out.println(Student.printClassList());

System.out.println(Student.getLastStudent());

System.out.println(Student.getStudent(1));

Student.addStudent(2, new Student("Trevor", 12));

System.out.println(Student.printClassList());

System.out.println(Student.getClassSize());

}

}

/* Student.java */

import java.util.ArrayList;

public class Student

{

private String name;

private int grade;

//Implement classList here:

private static ArrayList<Student> classList = new ArrayList<Student>();

public Student(String name, int grade)

{

this.name = name;

this.grade = grade;

classList.add(this);

}

public String getName()

{

return this.name;

}

//Add the static methods here:

public static String printClassList()

{

String names = "";

for(Student name: classList)

{

names+= name.getName() + "\n";

}

return "Student Class List:\n" + names;

}  

public static String getLastStudent() {

// index run from 0 so last student will be size -1

return classList.get(classList.size()-1).getName();

}

public static String getStudent(int i) {

// array starts from 0 so i-1 will be the student

return classList.get(i-1).getName();

}

public static void addStudent(int i, Student student) {

// array starts from 0 so, we add at i-1 position

classList.add(i-1,student);

// remove extra student

classList.remove(classList.size()-1);

}  

public static int getClassSize() {

return classList.size();

}

}

You might be interested in
1.erros can easily be ____ 2.work is done in an ____ no mess environment 3.colors do not _____ and brushes are never ______ 4.st
bonufazy [111]

Answer:

1) corrected

2) organized

3) Fade and worn-out

4) saved

5) saved

6) organized and graphics

6 0
2 years ago
Suppose Dave drops a watermelon off a high bridge and lets it fall until it hits the water. If we neglect air resistance, then t
MaRussiya [10]

Answer:

#include <bits/stdc++.h>

using namespace std;

// driver function

int main()

{

   // variables

  const double g = 9.8;

int sec;

double height;

int    t  = 0;    

double d = 0;    

bool   flag = false;  

// ask to enter time

cout << "Please enter the time of fall(in seconds):";

// read time

cin >> sec;

//ask to enter height

cout << "Please enter the height (in meters):";

//read height

cin >> height;

cout << '\n'

     << "Time(seconds)   Distance(meters)\n"

        "********************************\n";

// calculate height after each seconds

while ( t <= sec) {

cout << setw(23) << left << t

      << setw(24) << left << d << '\n';

// if input height is less

 if ( d > height ) {

  flag = true;

 }

// increament the time

 t += 1;

// find distance

 d = 0.5 * g * (t) * (t);

}

cout << '\n';

// if input height is less then print the Warning

if ( flag ) {

 cout << "Warning - Bad Data: The distance fallen exceeds the height"

         " of the bridge.\n";

}

return 0;

}

Explanation:

Read the time in seconds from user and assign it to "sec" then read height and  assign it to "height".After this find the distance after each second.If the input height is less than the distance at any second, it will print a Warning message. otherwise it will print the distance after each second.

Output:

Please enter the time of fall(in seconds):11                                                                              

Please enter the height (in meters):1111                                                                                  

                                                                                                                         

Time(seconds)   Distance(meters)                                                                                          

********************************                                                                                          

0                      0                                                                                                  

1                      4.9                                                                                                

2                      19.6                                                                                                

3                      44.1                                                                                                

4                      78.4                                                                                                

5                      122.5                                                                                              

6                      176.4                                                                                              

7                      240.1                                                                                              

8                      313.6                                                                                              

9                      396.9                                                                                              

10                     490                                                                                                

11                     592.9  

5 0
2 years ago
Suppose the algorithms used to implement the operations at layer k is changed. how does this impact services at layers k-1 and k
yarga [219]
If the algorithm is changed for the operations at layer k, the services at k1 will change since the services will be operated after the layer. For the services at k-1, they will not be affected since they are prior to the algorithms.<span />
4 0
2 years ago
As part of the duties of a digital forensics examiner, creating an investigation plan is a standard practice. Write a 3 to 4 (no
Simora [160]

Answer:

A digital forensic investigation is a special case of a digital investigation. Where the procedure and techniques are used will allow the results to be entered into cost of low foreg on investigation may be started to answer a question about whether or not centraband digital images exist on a computer.

Here we are considering the case of Global Finance Company with wide range of financial products and wide range of customers throughout the world. A suspect of compromise has been detected from the manager's computer. Now the team has been deployed to the branch office and conduct the Digital Forensic Investigation.

Concern of the Company

1. Regular updates for application infrastructure and network infrastructure.

2. One branch managers from porisbane branch felt compromises in his computer.

3. Both the servers and work station from all the offices are based on Microsoft Windows.

4. The firewalls and network segmentation are fully implemented.

5. Through intrasion detection and logging exist in the brances these are hardly used.

Digital Forensic Investigation Approach

The audit term of the Global Finacnce Company can follow four step. The digital forensic investigation model stands to be most effective model for investigation of the compromise happened int he reginal branch of the Global Finance Company.

1. Collection

a. All information from the manager's workstation, servers and other workstations must be collected.

b. Obtain all the important informtation.

c. Identify storage context noth internal and external devices.

d. Forensic tools that are applicable and to be used for the investigation are to be listed and made available for usage.

e. Target computer forensic imaging to be done and hashed to check the integrity of data.

f. Line network traffic has to captured.

Digital Evidance Collection done in two stages:

Volatile memory is the temporary memory and primary volatile memory is RAM

By cinning command: Cryptcat6543 -k key

Computer data can now required with the command Cryptcat -1 -p6543 -k key>>

Non volatile Memory Acquisition: Permanent memory or volatile memory stands significant source for the digital forensic investigation.

Parmanent data is collected through both online and offline methods:

Offline data is collected from the hard drive applications tool such as Guymayers etc.

Online data like firewall logs, antivirus logs and domain controller log with help of wires work and ethernal collected.

2. Examination

Once the data collected detailed examination is done by comparing the original and logical copies collected. Such examination gives us clues of how manege for window registry examination. Command used echo text_mess > file1.text : file2.txt

The above file retrieved through the command more < file1.txt : file2.txt

The network forensic is enabled using the tools and techniques so that the following potential information can be accessed.

System Information, Service listing, Process listing, Registry information, Binary dumped of memory

3. Analysis with Assumption

Many tools and methodologies are used by the audit team to analyse the collection and examined evidence. Analysis is done according to the following:

a. Leyword searches in all the files

b. Recovering the deleted files

c. Registry information extraction from the workstation

The tools used in this phase are FTK and ILOOKIX. These tools are helpful to recover the document, chat, logs, emails.

4. Report

The final report is generated by the audit team

Purpose of report Digital Forensic investigation conducted on the compromise of manager's computer

Author of the report Aufit Team

Incident Summery The source of compromise are x, y, x

Evidence All the effected files, registry, log files

Analysis All the analyzed data analyzed

Conclusion All digital evidence are extracted and found from the source

Document support volatile and non volatile data, tools, log info, registry info and so on.

7 0
2 years ago
Universal Containers recently rolled out a Lightning Knowledge implementation; however, users are finding unreliable and unrelat
blsea [12.9K]

Answer:

Option B and option C are the correct options.

Explanation:

When they have arisen an execution the following Knowledge related to the Lightning then, the users will find incredible and that Knowledge which is not related to the Articles for showing on the Salesforce Console's Knowledge One widget.

So, the following actions that are recommended to the consultant for checking the lack of quality are.

  • Firstly, they have to activate and customize wildcards to scan for objects.
  • Then, Establish an intuitive hierarchy for the Data Category.
7 0
2 years ago
Other questions:
  • Hybrid processors that can process 32 bits or 64 bits are known by what term?
    8·1 answer
  • Isabel is creating a wireframe. She has drawn a layout for the home page along with outlining the navigation elements. She now w
    15·2 answers
  • Suppose that you need to maintain a collection of data whose contents are fixed- i.e., you need to search for and retrieve exist
    8·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • Use Excel to develop a regression model for the Consumer Food Database (using the "Excel Databases.xls" file on Blackboard) to p
    13·1 answer
  • 2 Name the package that contains scanner class?​
    10·1 answer
  • Write a program that reads students’ names followed by their test scores. The program should output each student’s name followed
    13·1 answer
  • The signature area in a cover letter includes the sender's first and last name, followed by his/her job title (if applicable). *
    13·1 answer
  • Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    7·1 answer
  • Select the correct answer.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!