jagomart
digital resources
picture1_Python Object Oriented Programming Pdf 196357 | Proj3 Item Download 2023-02-07 10-02-16


 122x       Filetype PDF       File size 0.95 MB       Source: samyzaf.com


File: Python Object Oriented Programming Pdf 196357 | Proj3 Item Download 2023-02-07 10-02-16
project 3 python object model object oriented design object oriented programming 1 download the file graphics py from the link https samyzaf com braude python projects graphics py this file ...

icon picture PDF Filetype PDF | Posted on 07 Feb 2023 | 2 years ago
Partial capture of text on file.
                 Project 3
       PYTHON OBJECT MODEL
             OBJECT ORIENTED DESIGN
                            Object Oriented Programming                 1
     Download the file graphics.py from the link:
    https://samyzaf.com/braude/PYTHON/projects/graphics.py
     This file implements our graphical environment. Specifically, it defines a 
       canvas window on which we can draw points, lines, rectangles, and 
       other geometrical shapes
     There is no need to read or understand the code in this module
     It is based on the the Tkinter module, which is the simplest graphics 
       environment that comes with any Python distribution and is therefore 
       always available
     If you want to experiment with graphics programming, you may start 
       with: 
       http://www.tkdocs.com/tutorial/
                                    Object Oriented Programming                            2
     p = Point(x,y)                                     [constructor]
          Create a new point p from two integers: x, y
          Our domain is the two-dimensional plane for abstract circuit design (CAD system)
     p.x = x coordinate                                                  [field]
     p.y = y coordinate                                                  [field]
     p.move(dx, dy)                                     [mutator]
          Move the point p to new coordinates: x+dx, y+dy
     p.draw()                                           [accessor]
          Draw the point on the screen
     p.text(t)                                          [accessor]
          Draw a texts string t above the point
                                     Object Oriented Programming                              3
    Reminder: in test driven methodology you write your tests before the implementation of 
      your ADT !!!
    After implementation, your tests should run and PASS after each modification you make 
      to your implementation (“nightly test regression”)
    The following tests are your “insurance policy” that your implementation is correct. The 
      more tests you write, the more you’re insured
          # Testing our Point ADT: test 1
          def test1():
              print "===== Testing The Point Class ====="
              p1 = Point(20,20)
              p2 = Point(50,60)
              print "Testing the Python print statement on Point p1:"
              print p1
              print "Testing the Python print statement on Point p2:"
              print p2
              print "Test 1: PASSED"
                                Object Oriented Programming                       4
The words contained in this file might help you see if this file matches what you are looking for:

...Project python object model oriented design programming download the file graphics py from link https samyzaf com braude projects this implements our graphical environment specifically it defines a canvas window on which we can draw points lines rectangles and other geometrical shapes there is no need to read or understand code in module based tkinter simplest that comes with any distribution therefore always available if you want experiment may start http www tkdocs tutorial p point x y create new two integers domain dimensional plane for abstract circuit cad system coordinate move dx dy coordinates screen text t texts string above reminder test driven methodology write your tests before implementation of adt after should run pass each modification make nightly regression following are insurance policy correct more re insured testing def print class statement passed...

no reviews yet
Please Login to review.