Nt1420 Unit 8

Decent Essays
Complete the following problems.

1. Write C++ statements to do the following:

a. Declare an array alpha of 15 components of type int. int[] alpha = new int[15];
b. Output the value of the 10th component of the alpha array.
System.out.println(alpha[10]);

c. Set the value of the 5th component of the alpha array to 35. alpha[4]=35 d. Set the value of the 9th component of the alpha array to the sum of the 6th and 13th components of the alpha array. Alpha[8]=(6*13)
e. Set the value of the 4th component of the alpha array to three times the value of the 8th component minus 57. alpha[3]=(3*alpha[7])-57; f. Output alpha so that five components appear on each line. int counter = 0; for (int i = 0; i < 3; i++) { counter = (i * 5); System.out.println(alpha[counter] + " " + alpha[counter + 1] + alpha[counter + 2] + " " + alpha[counter + 3] + " " + alpha[counter + 4]); }
…show more content…
What is stored in the list array after the following code executes?

int list[5]; for(int j = 0; j < 5; j++) { list[j] = 2 * j + 5; if (j % 2 == 0) { list[j] = list[j] - 3; } }
The numerical values of 2,7,6,11,10
3. What does array index out of bounds mean? What can happen if this occurs in your program? This means that the value given is either a negative or is greater than or equal to the size of the array. If this occurs within your program than you will get a runtime error causing the program to not fully operate.

4. Write C++ statements to define and initialize the following arrays using appropriate data types:

a. An array of heights has 6 components which have the following values: 5.5, 5.8, 6.3, 6.6, 4.9, 5.9. b. An array of weights has 4 components which have the values: 140, 165, 190, 207. c. An array of symbols which contains the following characters: '$', '%', '@', '!', '|',

Related Documents

  • Decent Essays

    Nt1310 Unit 5 Lab 3

    • 441 Words
    • 2 Pages

    Jonathan Desmond DCN Lab 5 Kali Kali is a live Linux distribution which can be put onto a USB and loaded directly onto a computer. Kali, having being bundled with a variety of testing tools such as Wireshark and Metasploit Framework, is utilized to assess the security of a target machine. The creator of Kali, Mati Aharoni first thought of the idea during a consultation which banned the use of external hardware as well as the stipulation that client computers could only be used if the data remained untouched. He then thought to use a live Linux distribution to assess the client’s security flaws.…

    • 441 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Nt1310 Unit 6 Lab

    • 1594 Words
    • 7 Pages

    My group had been given a specific task to investigate according to the lab manual1. We were employed by the Environmental Protection Agency as chemists. Our task is to identify an unknown compound that was found in a nearby landfill. In this laboratory, the unknown compound was given to us by our TA. The main goal of this experiment was to correctly identify the unknown compound.…

    • 1594 Words
    • 7 Pages
    Improved Essays
  • Improved Essays

    Nt1310 Unit 6

    • 858 Words
    • 4 Pages

    Task-5 a) • Metals Metal structure is made up of crystals of metals which are made up of positive metal ions and these ions are surrounded by a sea of delocalized electrons. To separate these substances from this crystal lattice a lot of energy is needed. In between the positive and negative ions is present a strong electrostatic force of attraction. That is the reason why metals have strong melting and boiling points. In order to slide one layer of the metal ions over the other layer very less amount of energy is used.…

    • 858 Words
    • 4 Pages
    Improved Essays
  • Superior Essays

    Nt1310 Unit 8.2

    • 772 Words
    • 4 Pages

    Kaplan University IT286 Unit 8.2 Jennifer Polisano Answer 8.2: As the IT Security Professional for Web Site 101, I will be recommending adjustments for recent security issues, including data loss due to employee negligence, physical break ins, identifying employee security standards, identifying network access specifics, and the recent hacking of the home page of Web Site 101. Web Site 101 currently has 300 employees working on three levels of the office building. In the previous years, this organization has grossed 2 million dollars revenue per year. For the organization to continue to thrive, these security problems will need to be addressed immediately.…

    • 772 Words
    • 4 Pages
    Superior Essays
  • Improved Essays

    Nt1310 Unit 1 Lab 1

    • 439 Words
    • 2 Pages

    Speed, availability, and reliability are vital for a successful network infrastructure in terms of productivity and user experience. When first configuring this lab, I had to make the decision of whether or not to use one server to run all of the services or if the load should be distributed amongst multiple machines. I decided to go with the later, having a separate server hosting the wiki, another providing monitor services, and yet another acting as the DHCP, DNS and AD controller. While the last three were not required in the scope of this lab, I wanted to set up my initial network in a scalable manner, and this was the best solution for future growth. Distributing the services across multiple machines helps to reduce the processing that each box is required to do in order to fulfill requests.…

    • 439 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Nt1310 Unit 4 Lab 4

    • 367 Words
    • 2 Pages

    The first objective of Lab 4 is to use structure activity relationships to predict the properties of an acid and the potency of hallucinogenic compounds. The overall goal of the laboratory is to examine quantitative structure activity relationships (QSAR) in a system that is either chemical or biochemical. The lab is divided into two parts; predicting the acidity of an organic acid, and predicting the hallucinogenicity of derivatives of mescaline. The materials of this lab for both part 1 and part 2 are small training sets, which are groups of similar chemicals with known biological activity, a computer to graph the data that is recorded in the tables, the internet resource MiLogP to generate LogP data, and computational programs that will…

    • 367 Words
    • 2 Pages
    Improved Essays
  • Great Essays

    Nt1330 Unit 3

    • 1174 Words
    • 5 Pages

    Secure Shell (SSH) In this paper, I will discuss the network protocol Secure shell, better known as SSH. Interest in choosing this protocol came from my frequent use of SSH to run applications on the remote servers in Coover Hall. Because of this, I will be exploring the details on how the protocol works, vulnerabilities associated with it and mitigation techniques put in place to counter attacks. SSH is a Cryptographic Network Protocol created to replace Telnet.…

    • 1174 Words
    • 5 Pages
    Great Essays
  • Decent Essays

    Nt1310 Unit 2

    • 234 Words
    • 1 Pages

    1. Who will participate in the evaluation? The person that will participate in this evaluation is my cousin. 2.…

    • 234 Words
    • 1 Pages
    Decent Essays
  • Improved Essays

    Nt1330 Unit 2

    • 369 Words
    • 2 Pages

    Based on the findings obtained from the analysis of security information then compiled recommendations for improvement of the condition of the company. Some recommendations are: 1. Describe in detail the confidentiality agreement and specifically including maintaining the confidentiality of the password 2. Reexamination of the access rights of each and updating access rights in case of transfer of part or advancement in accordance with their respective access rights. 3.…

    • 369 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Nt1310 Unit 3

    • 271 Words
    • 2 Pages

    -------------------------------------------------------------------------------- Security ( show explanationhide explanation ) This is a public or shared computer Select this option if you are connecting from a public computer. Be sure to log off and close all browser windows to end your session.…

    • 271 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Part 1 Different data types and their uses - The different data types that is available for creating or developing a program on software. An example of programming software would be Microsoft Visual Studio. With this software, many data types are used which can drive an event. -…

    • 841 Words
    • 4 Pages
    Improved Essays
  • Improved Essays

    Nt1330 Unit 3

    • 483 Words
    • 2 Pages

    Microsoft was the one to develop Active Directory. Directory services are provided by Active Directory to windows domain network. It stores all the information related to files, users, resources and computers. It places them in proper hierarchal logical groupings. It uses this information to provide the right access and authority to the right user.…

    • 483 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Nt1330 Unit 7

    • 1149 Words
    • 5 Pages

    1. Focus on the overall “security assessment” risk rating that appears at the top of your report. Considering what security measures you (or the computer owner) have undertaken for your computer, does the assessment surprise you? Why or why not? What measures should you plan to undertake if the green checkmark did not appear?…

    • 1149 Words
    • 5 Pages
    Improved Essays
  • Improved Essays

    Nt1320 Unit 7

    • 1110 Words
    • 5 Pages

    1. How is the Moon dependent on the Sun? The Moon is dependent on the Sun for its different lunar phases. Although these phases may not be essential to the existence of the Moon, they would not occur without the Sun.…

    • 1110 Words
    • 5 Pages
    Improved Essays
  • Improved Essays

    Importance Of MIS

    • 969 Words
    • 4 Pages

    Q3: How can you use the five-component model? The five components of an information system: 1. Hardware runs and makes up the computer system; 2.…

    • 969 Words
    • 4 Pages
    Improved Essays