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

  • 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

    it the functions listed below for Exercise 2. In each case, the appropriate error message should be generated if an invalid condition occurs. For example, an error message should be generated when trying to insert an item in a given location in the list and the location is out of range, a. ArrayList(inl size): create a constructor that sets the size of the array list to the value passed in size (note that the class variable SIZE cannot be final anymore), b. int length(): create this function to determine the number of items in the list (accessor function), c. int gelSize(): create this function to determine the size of the list (accessor function), d. void clear(): create this function to remove all of the items from the list. After this operation, the length of the list is zero, e. void replace(int location, int item): create this function to replace the item in the list at the position specified by location. The item should be replaced with item. f. void insert(int location, int item): create this function to add an item to the list at the position specified by location, g. void remove(int item): create this function to delete an item from the list. All ...…

    • 714 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Nt1330 Unit 1 Assignment 1

    • 4614 Words
    • 19 Pages

    A ______ is rectangular area that can contain a document, program, or message option1 A __________ contains icon buttons that access frequently used commands A __________ provides access to features of the program A built-in tool that performs calculations automatically is a(an) A collection of related data that has been entered into a computer is called a A collection of separate software applications that are sold as a group, like Microsoft Office, is called a(n) A database sort directs the software to find and display one or more records option2 option1 option3 option3 option4 option2…

    • 4614 Words
    • 19 Pages
    Good Essays
  • Good Essays

    Pt1420 Unit 2 Study Guide

    • 1286 Words
    • 6 Pages

    4 Describe the following methods of automated data capture. Give an example, in each case,…

    • 1286 Words
    • 6 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
  • Satisfactory Essays

    Lab 204 Quiz

    • 2478 Words
    • 10 Pages

    You follow certain step’s to access the supplementary readings for a course when u sing your organizations library management system. These steps that you follow are examples of the _________ components of an information system.…

    • 2478 Words
    • 10 Pages
    Satisfactory 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
  • 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

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

    • 748 Words
    • 3 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
  • 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
  • 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
  • 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

    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
  • Satisfactory Essays

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

    • 369 Words
    • 2 Pages
    Satisfactory Essays