• Kĩ thuật lập trình - Chapter 14: Graph class designKĩ thuật lập trình - Chapter 14: Graph class design

    To override a virtual function, you need A virtual function Exactly the same name Exactly the same type struct B { void f1(); // not virtual virtual void f2(char); virtual void f3(char) const; virtual void f4(int); };

    ppt33 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 977 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 13: Graphics classesKĩ thuật lập trình - Chapter 13: Graphics classes

    Simple_window win20(pt,600,400,"16*16 color matrix"); Vector_ref vr; // use like vector // but imagine that it holds references to objects for (int i = 0; i<16; ++i) { // i is the horizontal coordinate for (int j = 0; j<16; ++j) { // j is the vertical coordinate vr.push_back(new Rectangle(Point(i*20,j*20),20,20)); vr[vr.size(...

    ppt33 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 982 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 12: A display modelKĩ thuật lập trình - Chapter 12: A display model

    Circle c(Point(100,200),50); // center, radius Ellipse e(Point(100,200), 75,25); // center, horizontal radius, vertical radius e.set_color(Color::dark_red); Mark m(Point(100,200),'x'); ostringstream oss; oss << "screen size: " << x_max() << "*" << y_max() << "; window size: " << win.x_max() << "*" << win.y_max(); Text sizes(Point(100...

    ppt45 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 931 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 11: Customizing I/ OKĩ thuật lập trình - Chapter 11: Customizing I/ O

    Binary literals 0b1010100100000011 Digit separators 0b1010'1001'0000'0011 Can also be used for for decimal, octal, and hexadecimal numbers User-Defined Literals (UDLs) in the standard library Time: 2h+10m+12s+123ms+3456ns Complex: 2+4i

    ppt28 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 954 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 10: Input/ Output StreamsKĩ thuật lập trình - Chapter 10: Input/ Output Streams

    What logical parts do we what? int get_int(int low, int high); // read an int in [low.high] from cin int get_int(); // read an int from cin // so that we can check the range int void skip_to_int(); // we found some “garbage” character // so skip until we find an int Separate functions that do the logically separate actions

    ppt35 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1002 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 9: Technicalities: Classes, etcKĩ thuật lập trình - Chapter 9: Technicalities: Classes, etc

    Essential operations Default constructor (defaults to: nothing) No default if any other constructor is declared Copy constructor (defaults to: copy the member) Copy assignment (defaults to: copy the members) Destructor (defaults to: nothing) For example Date d; // error: no default constructor Date d2 = d; // ok: copy initialized (copy the ...

    ppt31 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 974 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 8: Technicalities: Functions, etcKĩ thuật lập trình - Chapter 8: Technicalities: Functions, etc

    A namespace is a named scope The :: syntax is used to specify which namespace you are using and which (of many possible) objects of the same name you are referring to For example, cout is in namespace std, you could write: std::cout << "Please enter stuff \n";

    ppt33 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 981 | Lượt tải: 0

  • Hướng dẫn chạy SAP cho đồ án Bê Tông IIHướng dẫn chạy SAP cho đồ án Bê Tông II

    Case/Combo: + Nếu làm theo cách tổ hợp nội lực, xem và xuất kết quả của tưng trường hợp tải trọng TT, HT1, HT2, GT, GP, DDT,DDP. + Nếu làm theo cách tổ hợp tải trọng, chỉ cần tập trung vào các loại tổ hợp sau: TH1 : TT + HT1 TH1 : TT +.9( HT1+HT2) • Component: + Xem các thành phần, với khung phẳng trong mp X-Z là: + Axial Forces + Shear Fo...

    pdf39 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1131 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 7: Completing a programKĩ thuật lập trình - Chapter 7: Completing a program

    We did not (yet) add Negative numbers % (remainder/modulo) Pre-defined symbolic values Variables Read about that in Chapter 7 % and variables demonstrate useful techniques Major Point Providing “extra features” early causes major problems, delays, bugs, and confusion “Grow” your programs First get a simple working version Then, add fea...

    ppt31 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 942 | Lượt tải: 0

  • Kĩ thuật lập trình - Chapter 6: Writing a programKĩ thuật lập trình - Chapter 6: Writing a program

    Completing a program Tokens Recovering from errors Cleaning up the code Code review Testing

    ppt39 trang | Chia sẻ: nguyenlam99 | Ngày: 04/01/2019 | Lượt xem: 1050 | Lượt tải: 0