Preview

Ffgfgf

Satisfactory Essays
Open Document
Open Document
464 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Ffgfgf
CS1133 – OOP & Data Structures Assignment # 2 (Section 5, 6) 15th March, 2013 nd Date of submission: 22 March, 2013

Maximum Marks. 20.

Note: Assignment is required to be submitted in soft copy format, a quiz related to assignment will be held in next week which will contain 50% weight of this assignment. You are required to submit the .cpp files of each of the following programs in a folder whose path will be announced in next class. Please write your name, registration number and section number in form of comments at start of each file.

1. Design a program in C++, to implement a class named “Shape”. It should have following attributes which are required to be defined as private. square_side (int), rectangle_width(int), rectangle_length(int), circle_radius(float) Class should have following member functions and some other member data: a. A parameterized constructor function should allow the initialization of an object of shape class, the parameters of constructor function should contain the default values 0, 0, 0 and 0.0 for squre_side, rectangle_width, rectangle_length and circle_radius attributes. b. A destructor for class is also required to be defined. c. An input function, which should allow user to provide input values for attributes of shape class objects. d. An output function should display the values of attributes of shape class objects. e. A member function calc_squre_area() which should calculate area of square by using attribute square_side. f. A member function calc_rectangle_area() which should calculate are of a rectangle by using attributes rectangle_width and rectangle_length. g. A member function add_shape() which should allow addition of two shape objects by adding their respective attributes. Syntax of function header should be: shape add_shape(shape obj); h. Class should contain a static member data of integer type named “total_shapes” which will be incremented when an object of shape class will be created and decremented when object

You May Also Find These Documents Helpful

  • Good Essays

    This is our first individual assignment for Programming unit this semester. This assignment was given in December 2013, and submission date is on 10th February 2014.…

    • 1859 Words
    • 8 Pages
    Good Essays
  • Powerful Essays

    Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9 Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Chapter 15 Chapter 16 Chapter 17 Chapter 18 Chapter 19 Chapter 20 Chapter 21 Chapter 22 Chapter 23 Chapter 24 Chapter 25 Chapter 26 Chapter 27 An Introduction to Hardware, Software, and the Internet An Introduction to Software Development Objects and Classes Algorithms Java Syntax and Style Data Types, Variables, and Arithmetic Boolean Expressions and if-else Statements Iterative Statements: while, for, do–while Implementing Classes and Using Objects Strings Class Hierarchies and Interfaces Arrays…

    • 3908 Words
    • 16 Pages
    Powerful Essays
  • Satisfactory Essays

    Today’s lecture will be spent entirely in the computer lab. At the end of lab, submit this worksheet.…

    • 581 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Info1105

    • 951 Words
    • 4 Pages

    You are NOT allowed to use any 3rd‐party libraries for this assignment. All code must be your own work. NOTE: You should write your own set of JUnit tests in the test files to ensure your 4 classes are working. Part of the assignment will be automatically marked, and you will only be allowed THREE (3) attempts in total. Each required file is covered in more detail below. A skeleton project has also been provided through eLearning.…

    • 951 Words
    • 4 Pages
    Good Essays
  • Good Essays

    It210 Syllabus

    • 2333 Words
    • 10 Pages

    Objectives 1.1 Describe the importance of using a structured, modular approach when creating program requirements, design, and code. 1.2 Identify how a computer processes and stores data. Read the course description and objectives. Read the instructor’s biography and post your own. Read Appendix A. Read Ch. 2 of Prelude to Programming. Read Ch. 3 of Prelude to Programming.…

    • 2333 Words
    • 10 Pages
    Good Essays
  • Good Essays

    The Victorian era is a period during the 1800s that upheld strict roles in society, particularly for females. Women's inferiority to men display vividly throughout the course of the period, and female liberties and rights were seldom. Kate Chopin, an American author, created the novella to depict the habitual lifestyle of Victorian women. Given the time of publication, one could dispute the condemnation of the novella as a result of its central concept: feminism. In recent years, however, a plethora of people eulogize Chopin for her eloquent depiction of women's lives. Chopin employs characterization, symbolism, and allegory to reveal maiden roles in the Victorian society and clarify the struggle for feminism.…

    • 892 Words
    • 4 Pages
    Good Essays
  • Good Essays

    References: • Nirosh. (2010). Introduction to Object Oriented Programming Concepts (OOP) and More. The Code Project. Retrieved from: http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx.…

    • 817 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    CS 220 – Programming w/ Data Structures: You have missed one assignment and one quiz. Your instructor has extended your assignment due date to this Sunday, April 10. Your instructor has also let you to take your Quiz # 2 during his office hours during this week. Let me know if you need additional support to study for this quiz. Your grade to date in this class is 30.2/37 81.62% B.…

    • 354 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Fbgf

    • 2515 Words
    • 11 Pages

    If we look deep down in the roots of the evolution of the Homo Sapiens from the primate apes, we notice a basic and natural tendency of the evolving man; to find for himself the best and to develop his life and the way of his living, and this is the behavior which sets him apart from the rest of the organisms. The zest, for him to find the best had and will lead him to develop, not only physically, but, also mentally. Due to this tendency the primate apes have developed into Homo sapiens, and will continue to do so. With the development of man, man’s practices developed and soon formed the foundations of his present day technology, as man evolved his technology evolved. The basis of this technology consisted of the basic primitive discoveries and inventions such as fire, the wheel, agriculture, the lever, domestication of other species, and other various things.…

    • 2515 Words
    • 11 Pages
    Good Essays
  • Powerful Essays

    Gdfgf

    • 13701 Words
    • 55 Pages

    GOVERNMENT OF NCT OF DELHI DELHI SUBORDINATE SERVICES SELECTION BOARD FC-18, INSTITUTIONAL AREA, KARKARDOOMA, DELHI110092…

    • 13701 Words
    • 55 Pages
    Powerful Essays
  • Good Essays

    Fxpaint

    • 1014 Words
    • 5 Pages

    This assignment is meant to be open-ended. The implementation and design is up to you to decide. The quality of…

    • 1014 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    gfgfgfgg

    • 334 Words
    • 2 Pages

    Ardavan Farhad Moshiri (Persian: اردوان فرهاد ﻣﺸﻴﺮى‎) born 18 May 1955 in Iran is an Iranian-British businessman and investor, who resides in Monaco.[3] Moshiri owns and has shares in numerous steel and energy companies in Britain and Russia.[4]…

    • 334 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lobos

    • 942 Words
    • 4 Pages

    Computer Science & Engg. & Information Science & Engg. III Sem. 9.30 a.m. - 12.30 p.m. MATDIP301–Advanced Mathematics–I 10MAT31–Engineering Mathematics–III 10CS32–Electronic Circuits 10CS33–Logic Design 10CS34–Discrete Mathematical Structures 10CS35–Data Structures with C 10CS36–Object Oriented Programming with C++…

    • 942 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    10) When a function is declared _________ the compiler replaces the function call with the respective function code.…

    • 694 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    Ffxg

    • 8403 Words
    • 34 Pages

    Link retrieves the three stones and returns to the castle, where he sees Ganondorf pursuing Zelda on horseback. Spotting Link, Zelda throws the Ocarina of Time into the castle moat. After Link retrieves the Ocarina, Zelda…

    • 8403 Words
    • 34 Pages
    Powerful Essays