top down design day 2 - false Boolean operators-boolean...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
top down design : stat with the main idea first - 80 / 20 point: %80 of the work can be done in the first 20 minutes - top down : you will go and try a design, if it doesn't work you will back track until it does - top down design relies on choosing the right part to work on next : if you flesh your main problem into subproblems, attempt those first rather than a subproblems subproblem. This time efficient and helps you to figure out whether your main idea interpretation was correct. Don't be afraid to go back and correct yourself later -optimizing code should be done after testing code repeatedly. One should not assume that one certain block of code will require the most optimizing, when in fact another needs more attention. - a loop with a <= should closely examined and kept track of -incorporate this structure to have multiple cases for a loop for (int i = 0 ; i < size && !found; i++) this says that the loop will continue so long as i is less than the size AND, the flag found, is still
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: false Boolean operators -boolean values can either be true or false two variables p and q are boolean here are all their possible values according to a truth table p | q | p and q | p or q | t | t | t | t | t | f | f | t | f | t | f | t | f | f | f | f |-&& is like an if then else : it only evaluates the part after it if the first result is true-abstract classes require a subclass to implement them-final helps java to understand/compile the program easier. (as well as humans)-square slice 9 3x3 squares: -number the squares as such: 0 1 2 3 4 5 6 7 8 for example the 5th square would contain the location : (3,6) (3,7) (3,8) (4,6) (4,7) (4,8) (5,6) (5,7) (5,8)-the starting squares for each of the nine squares are : (0,0) (0,3) (0,6) (0,0) (0,1) (0,2) (3,0) (3,3) (3,6) OR 3x (1,0) (1,1) (1,2) (6,0) (6,3) (6,6) (2,0) (2,1) (2,2)-look at the first element of a square and then check its offsets-everything divisible by N is in column 0! [012][345][678]...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern