logotransparent.png

Legion of Learners

www.lol-101.com

  • Home

  • Classrooms

  • Courses

  • About Us

    • Executive Team
    • Board Members
  • Resources

  • More

    Use tab to navigate through the menu items.
    To see this working, head to your live site.
    • Categories
    • All Posts
    • My Posts
    sfolax6776
    Jun 27, 2019
      ·  Edited: Dec 08, 2020

    6.9 How to create 3-D arryas? What are ragged arrays?

    in Introduction to Java

    A. Introduction

    If you can create 2-D arrays, can you create 3-D arrays or multiple-dimensional arrays? Can you create an array that has different numbers of columns in each row? The answer is Yes.

    B. Watch (slides)

    C. Try this:

    Assume there are three high schools, each has four classes of freshman through senior. A number of 2 to 5 students are randomly picked from each class at each school. Create a 3-D ragged array to store each student's GPA and calculate the average GPA of each class at each school, then the average GPA of the three schools. You can make up the GPA data for each student.

    0 comments
    0
    0 comments

    Questions? Email us at legionoflearners@gmail.com or join our WeChat group!

    • lol-101dotcom

    ©2020 Legion of Learners