Preview

OOPS Assignment 1

Good Essays
Open Document
Open Document
850 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
OOPS Assignment 1
Q1. Prepare a list of objects that you would expect each of the following system to handle
a. A program for laying out a newspaper
b. A program to compute and store bowling score
c. A telephone answering machine
d. A controller for DVD writer
e. A catalog store order entry system

SOLUTION:

a. A program for laying out a newspaper: public class Newspaper
{
Design;
News;
Pictures:
Advertisement;
}

b. A program to compute and store bowling score. public class bowling
{
Startbowl;
Countscore;
Countbowl;
Endbowl;
}

c. A telephone answering machine. public class AnsMchine
{
Call receiving;
Auto Answer;
Msg record;
}

d. A controller for DVD writer. public class Dvdcontrol

{
ReadDVD;
Disk speed;
Write DVD;
}

e. A catalog store order entry system. public class Catalog
{
Product info.;
Stock Management;
Order placing;
Order collection;
Order entry;
}

Q2. There are two lists below. The first is a list of classes that describes implementation objects. The second is a list of operations. For each class, select the operations that make sense for object in class. Discuss the behavior of each operation listed for each class
Classes
variable length array-ordered collection of objects, indexed by integer , whose size can vary at run time
Symbol Table- a table that maps text keywords into description
Set-unordered collection of objects with no duplicates

Operations
Append---add an object to the end of collection
Copy---make a copy of a collection
Count---return the no. of elements in collection
Delete---remove a member from collection
Index---retrieve an object from a collection at a given position
Intersect---determine the common members of two collections
Insert---place an object into a collection at a given position
Update---add a member to a collection, writing over whatever is already there

SOLUTION:

1 Variable length array-ordered collection of objects, indexed by

You May Also Find These Documents Helpful

  • Better Essays

    Assignment 1

    • 1301 Words
    • 6 Pages

    6. Many drug safety research studies are sponsored by pharmaceutical companies that would financially benefit if the results of the study are favorable. Is this an example of a potential confounding factor?…

    • 1301 Words
    • 6 Pages
    Better Essays
  • Satisfactory Essays

    unit 3

    • 313 Words
    • 2 Pages

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 313 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Answer the questions below. When you are finished, submit this assignment in the course dropbox.…

    • 369 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Assignment 1

    • 1774 Words
    • 19 Pages

    5. Use easily understandable language to demonstrate an understanding of the materials. Apply the knowledge developed to a similar context [(f) Communicate and Apply Unit 5]…

    • 1774 Words
    • 19 Pages
    Powerful Essays
  • Powerful Essays

    Err Assignment

    • 2007 Words
    • 9 Pages

    The agreed way of working with your employer to deal with conflict between colleagues would be to let the employer know, so they can deal with it in an appropriate way. Once the employer has been made aware of the situation, they can set up meetings with those involved, so they can calmly work things out, preventing things from getting out of hand in the workplace.…

    • 2007 Words
    • 9 Pages
    Powerful Essays
  • Good Essays

    Assignment 1

    • 872 Words
    • 4 Pages

    The IP addresses defined in a DHCP scope must be contiguous and are associated with a subnet mask. If the addresses you want to assign are not contiguous, you must create a scope encompassing all the addresses you want to assign and then exclude specific addresses or address ranges from the scope. So just be sure to check how you have your DHCP…

    • 872 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    PT1420 Chapter 3 Review

    • 1062 Words
    • 8 Pages

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 1062 Words
    • 8 Pages
    Satisfactory Essays
  • Good Essays

    Err Assignment

    • 1924 Words
    • 8 Pages

    A. You must inform your employer if you change your name, change your address, are off work because of sickness or if you want to change your annual leave.…

    • 1924 Words
    • 8 Pages
    Good Essays
  • Powerful Essays

    3. Write assignment statements that perform the following operations with the variables a, b, and c.…

    • 748 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Err Assignment

    • 1293 Words
    • 6 Pages

    I can confirm that the evidence listed for this unit is my own work and was carried out under the conditions and context specified in the assessment specification.…

    • 1293 Words
    • 6 Pages
    Good Essays
  • Good Essays

    2.) Answer the following questions based on a reading of the above document and material from your textbook.…

    • 973 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Q5) Explain what are constructors and describe the use of the same with suitable examples.…

    • 559 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    assignment2

    • 781 Words
    • 4 Pages

    Unnecessary nominalization obscures the real verb. Always fix passive voice constructions. See p. 236 & revise these to focus on the real verb:…

    • 781 Words
    • 4 Pages
    Powerful Essays
  • Good Essays

    Review each scenario below, and choose one to complete for your assignment. Each scenario contains specific questions that will ask you to provide examples, explain your suggestions for improvement, and refer to the lesson. Be sure to respond to each question in complete sentences.…

    • 1746 Words
    • 7 Pages
    Good Essays
  • Powerful Essays

    Theology 9 Study Guide

    • 785 Words
    • 5 Pages

    Instructions. Use quizzes, notes, power points, and class discussions to answer the following questions and define the following…

    • 785 Words
    • 5 Pages
    Powerful Essays