Free Essay

A Small File

In:

Submitted By kawuya
Words 329
Pages 2
Homework 5
C++ Programming /
Deadline is November 20

Exercise 1: Given the following C++ code: class A { public : int x; A *objARef; private : int y; protected : int z;
};
class B : public A { public : A objA;
};
class C { public : A objA; A *objARef; B objB;
};

Determine for each of the following attribute-access-expressions whether it results in an Error (Wrong) or not (OK).

| |in class A |in class B |in class C |
|x |[pic] |[pic] |[pic] |
|y |[pic] |[pic] |[pic] |
|z |[pic] |[pic] |[pic] |
|objA.x |[pic] |[pic] |[pic] |
|objA.y |[pic] |[pic] |[pic] |
|objA.z |[pic] |[pic] |[pic] |
|objARef->x |[pic] |[pic] |[pic] |
|objARef->y |[pic] |[pic] |[pic] |
|objARef->z |[pic] |[pic] |[pic] |
|objB.x |[pic] |[pic] |[pic] |
|objB.y |[pic] |[pic] |[pic] |
|objB.z |[pic] |[pic] |[pic] |

Exercise 2:
Given the following class hierarchy:

1. Create C++ code without attributes and methods for all for all 6 classes.

2. Extend the class character by a public attribute ch, so that it can store a single character.

3. Overload the operator + for the class Character, so that it can add two objects of type Character.

4. Override the operator + in the Digit class, so that it adds the numeric value of two digits and delivers the digit that we get if we finally apply “modulo 10”.
(Example ‘5’ + ‘6’ = ‘1’ // 5 + 6 = 11 % 10 = 1)

5. Extend the Object class by an object counter that counts the number of created objects for all objects of the above class hierarchy. (Tip: Lecture 9 slide 5) The counter should be embedded into the Object-class default constructor.

6. Change the visibility of the attribute ch, so that it is visible in all subclasses, but inaccessible from outside. Create a get-set method pair for the attribute ch.

7. Create a main-method, where you create 2 objects of each class in the above class hierarchy and that prints finally the value of your object counter (this should be 10).

Similar Documents

Premium Essay

Small Claim Court Case Analysis

...writing this paper so that I can learn about the process for filing a small claims lawsuit in Santa Clara County. According to the Santa Clara County Superior Court of California website, small claim courts are courts in which plaintiffs can resolve their disputes in the quickest, easiest, and cheapest ways. Small claim courts also have procedures which are straight-forward as well as an informal hearing as part of their process. The form which the plaintiff obtains to file a small claims court against another person, also known as the defendant, is on the website for the California Judicial Branch. When you go to that website, you go to the “Forms and Rules” tab and click on the link for the “Browse All Forms” page. There, you go to the...

Words: 1238 - Pages: 5

Premium Essay

Memorandum of Law and Letter Sample

...controversy in the three lawsuits that Bob wants to file? III. Why should Bob file his lawsuits in a particular court or courts? IV. Which case Bob must represent himself? Statement of Facts Our client Bob resides in Los Angeles, California and has asked for our advice in three separate cases in which he has loaned people money. In the first case, Bob loaned $500 to Al. Al signed a promissory note which says that Al will repay the loan in one month. Al has not paid anything. In the second case, Bob loaned $7,000.00 to Cathy 14 months ago. Cathy signed a promissory note which states that she would pay the note in full in 12 months. She has not paid. In the third case, Bob loaned $55,000 to Dan 24 months ago. Dan signed a promissory note stating he would repay the loan in 18 months. Dan has paid nothing. Al, Cathy, and Dan all reside in Los Angeles, California. California Statutes of Limitation Written agreements (promissory note): 4 years, calculated from the date of breach. Oral agreements: 2 years. The statute of limitation is stopped only if the debtor makes a payment on the account after the expiration of the applicable limitations period. Brief Answers I. Superior courts now have trial jurisdiction over all civil cases including family law, probate, juvenile, and general civil matters. For monetary issues under $10,000 a person in pro-per living in Los Angeles could file a complaint in small claims court. All filings over $10,000 would...

Words: 1906 - Pages: 8

Premium Essay

Nt1330 Unit 3

...functions and use of different servers in benefitting a small web presence business needs. Web Server: A web servers main job is to host and transfer data and also store data in which the Web server then gives to the users trying to access the website in terms of benefiting a small business, dependant on how popular the business is and how much it can afford to transfer its business online it may not be able to afford one Web server or be able to keep it running. However if it was able to afford a server it would only need One or two depending on the size of its market and users that would visit the site. Only big companies like Xbox live and Amazon, Google need lots and lots of servers to handle the millions and millions worth of Internet traffic a day which is why they need server rooms. However one server would be enough to host a small business as it would be able to cope with small amounts of traffic....

Words: 1152 - Pages: 5

Free Essay

Culture Makeup of Early Civilizations

...designated place within the classroom to be submitted. o To enter the classroom, click on the log into the Virtual Campus, click on the Classroom tab, and enter the class by clicking on the blue door. ACE Coach UNIV103 - 01232012 1 Where do I Submit my Individual Project (IP)? o To submit your Individual Project, click on the “Submit Assignments” link within your classroom. o Next, click “Add File.” To check your similarity score before submitting the Individual Project, click on Originality Verification. ACE Coach UNIV103 - 01232012 This is where you will see your similarity score. 2 How do I Submit my Individual Project (IP)? o Once you click “Add Files” a new window will o open, like the one shown below. Click on the drop down arrow next to the “Assignment” field and select which assignment you will be submitting from the drop down menu. o Choose your saved file o from your own computer by clicking “Browse” next to the “Upload File” field. Locate where you saved the file on your computer and click on that file and click “Open.” o Type comments for o ACE Coach UNIV103 - 01232012 the Instructor (if needed). When ready to submit the Individual Project, click “Submit Assignment.” 3 Submitting your Discussion Board (DB) o Your weekly Discussion Boards have 2 steps: 1. Replying to the main question 2. Responding to your classmates’ postings o To post your DB, o click on the “Discussion...

Words: 625 - Pages: 3

Free Essay

Records Organization

...Records Organization The similarities that I found for the organizations of patient files are that most of the paper files between the small and medium facilities are handled the same way. With the demographics and administrative filed on the left and medical on the right. Such as reports of labs, patient progress notes, prescription documentation, and any miscellaneous reports. Some of the small and medium facilities seem to use this filing method. This filing works well in a small to medium facility because there are not many files for the staff members to handle on a daily basis. I believe this system would not work with large facilities because the large facilities will need to use a filing system that is beneficial to the facility to keep track of patient’s files. The difference that I saw with the patient files are there organized by different departments and chronological, oldest to newest in small facilities and also organized using filing alphabetically this filing system will work because it will help keep these facilities organized and help maintain the patients records efficiently. In large facilities numerical filing will work to keep track of all patient files. The similarities I found with all three facilities are that loose documentation remains loose until the attending physician or the patient signs the required documentation needed. All this is done before anchored into patient files. Any remaining administrative documentation is anchored when found loose. Some facilities...

Words: 300 - Pages: 2

Premium Essay

Office Automation Sys

...requires a supporting file system. e/\ set of people "executing their procedures" ("carrying out tasks"), communicating with and referencing a supporting file system. e A set of communication media with thei:- corresponding communications, such as a filled-in fonn, a phone call, a copy of an order, or a file system query for organizing and processing information. e A gigantic database with users accessing and manipulating data. An automated office information system (0 IS) attempts to perform the functions of the ordinary office by means of a computer system. Automation in the office particl~larly aids the office worker in document preparation, information management and decision making. Such systems may be as modest as a group of independent word processors, or as complex as a distributed set of large, communicating computers. Within in this spectrum is a central computer with several interactive terminals, or a set of small interconnected computers. In either system the office worker would use a work station to perform his work, and that work station would be capable of electronically communicating with other work stations. In this paper we distinguish office information systems from data processing systems both by the autonomy of the system's parts, and by function. A data processing system is used to im A set of activities resulting from requests for service, each with a specific precedence. Each activity requires a supporting file system. e/\ set...

Words: 1924 - Pages: 8

Free Essay

Release Note

...New in 3.14.7 * Fixes an issue with Windows Explorer responsiveness. New in the 3.14 series * [Mac] On 64-bit OS X, Dropbox will run as a 64-bit application (except for dbfseventsd) * [Windows & Linux] Upgrade to Qt 5.5 * Many small fixes and improvements comments ------------------------------------------------- 3.14.52/9/2016 New in 3.14.5 * Fixes an issue that prevented Dropbox from starting on systems with certain firewall configurations New in the 3.14 series * [Mac] On 64-bit OS X, Dropbox will run as a 64-bit application (except for dbfseventsd) * [Windows & Linux] Upgrade to Qt 5.5 * Many small fixes and improvements comments ------------------------------------------------- 3.12.612/21/2015 New in 3.12.6 * Workaround for a connection issue for users in Oman New in the 3.12 series * New functionality for the badge * View if the document is shared, and change sharing permissions * Email file from the badge * Comments notifications * [Mac] UI improvements for the Tray Popup on Mac * [Windows] Support for Windows 10 Enterprise Data Protection * Changes to how the client runs before a user signs in * Reduced memory usage * Many small fixes and improvements comments ------------------------------------------------- 3.10.1111/5/2015 * Fixes rare error that causes Dropbox to fail to start with "Couldn't start Dropbox" dialog. comments ------------------------------------------------- ...

Words: 3750 - Pages: 15

Premium Essay

Nt1310 Unit 11 Assignment

...connect computers together in a small area to the same network. LAN networking area is limited, with a small geographical area approximately less than 1KM radius. Because of the limited distance, there will be very less data transfer error and the communication quality is also better compare to WAN. Because of the small network radius, file sharing in LAN is easy and it will transfer at a very fast rates. A LAN network is cheap and simple to install, expand and repair than WAN network. All computers can share the same computing device/peripheral if they’re connected to the network, which could save money. On LAN different Topology can be used, with the most common being used such as the ‘BUS’, ‘Ring’ and ‘Star’. From the uses and features of LAN, it can help the client because a LAN using Star topology, it can allow the team members to use the computer network and also more workstations can be added to the network easily without affecting the entire network. All computers in the network can share the same printer and other resources with full access right. Since the client team members are small, LAN should be ideal to them because it is cheap and also suitable to such a small group. Since LAN is a small network, the team members can share files/data to other members on the network, with a fast transferring rates, so the members doesn’t have to wait for a long amount of time to transfer a file/data. ...

Words: 1566 - Pages: 7

Premium Essay

Control Records

...patients privacy. Since there are different size medical facilities they have different areas as to where they keep the medical records for instance, filing drawer and a private sealed room, or a physician’s desk. Admittance to medical records is restricted to the faculty. Supervising access assist in problems with misplaced records, there would only be a small amount of faculty member who could have moved them, for that reason making it simpler to find. Finding a file can be hard for various reasons like; the file was taken by a faculty member they did what they had to do with the file, then another faculty member takes the file without citing the whereabouts of the file. To prevent these from happening you could have the staff use a check in and check out page. Health insurance portability and accountability act (HIPPA) command that patient records are confined in a private matter all the time. To make sure these rules and regulations are in task all the facilities are required to have a security plan. Small facilities can keep their records in a filing drawer, and it is locked. Larger facilities keep their files on a shelf behind the counter that patient come in to check in. A...

Words: 512 - Pages: 3

Premium Essay

Business

...cover cover next page > Cover Business, Management and Finance Small Business; Entrepreneurship title author publisher isbn10 | asin print isbn13 ebook isbn13 language subject publication date lcc ddc subject : : : : : : : Entrepreneurship and Small Business Burns, Paul. 0333914732 9780333914731 9781403917102 : : : : cover next page > file:///Z|/_==%CF%CE%C8%D1%CA==/Entrepreneurship%.../0333914732__gigle.ws/0333914732/files/cover.html [06.10.2009 1:01:58] page_i < previous page page_i next page > page_i next page > Page i Entrepreneurship and Small Business < previous page file:///Z|/_==%CF%CE%C8%D1%CA==/Entrepreneurship%...0333914732__gigle.ws/0333914732/files/page_i.html [06.10.2009 1:02:00] page_ii < previous page page_ii next page > page_ii next page > Page ii < previous page file:///Z|/_==%CF%CE%C8%D1%CA==/Entrepreneurship%2...0333914732__gigle.ws/0333914732/files/page_ii.html [06.10.2009 1:02:00] page_iii < previous page page_iii next page > page_iii next page > Page iii Entrepreneurship and Small Business Paul Burns < previous page file:///Z|/_==%CF%CE%C8%D1%CA==/Entrepreneurship%2...333914732__gigle.ws/0333914732/files/page_iii.html [06.10.2009 1:02:00] page_iv < previous page page_iv next page > Page iv © Paul Burns 2001 All rights reserved. No reproduction, copy or transmission of this publication may be...

Words: 182024 - Pages: 729

Free Essay

Real

...* Characteristics Of Informationwww.searchtherightwords.com/Searching for the Right Words? Say What Your Heart Wants To. * Characteristics Of Informationwww.hforcare.com/Search Characteristics Of Information Characteristics Of Information in One Site Ads View Slide Show * FB Share * Tweet * Pin It Close View Slide Show * View Slide Show Related Questions * What is duplicate content? * The Difference Between Selling and Marketing? * Recommend a list of free classifieds and directories with no reciprocal links requirement? * How do you get to a chat room to tell people about your website? Answer: The first characteristic is Relevance. The information that a person uses must be relevant to the current problem at hand. If the information is not relevant it would not help to solve the problem at all. The 2nd characteristic is Complete. The information must be complete. If the information is not complete and only partial information is received, it may lead to wrong decisions being made as only half of an entirety of the information is known. The 3rd characteristic is Accuracy. The information must be accurate as unaccurate information would lead to many different major problems as unaccurate information for example, may lead to people playing the stock market to lose alot of money. The 4th characteristic is Current. The information must be current as a fact of yesterday may not be a fact of today. For example, a criminal on the loose...

Words: 3338 - Pages: 14

Premium Essay

Nt1330 Unit 3 Assignment 1 Shell Script

...In this introduction, I provide any overview of the concepts regarding shell scripts. Explaining what is a shell script is and describing several common shells. Later, a tutorial is made available for demonstration how to backup a file or folder using a tool to accomplish these tasks. The SNTbackup is a shell script backup tool that gives users the option to select to select a file or folder to be backed up. A detail demonstration with screenshots is provided as a visual aid to readers. I used a simple Linux shell script to back-up the home directory of my system. The script uses the tar command to execute this task. SNTback is a simple, effective, fully customizable backup script that protects your folder by creating a duplicate of the specific folder. The duplicate of the selected folder is the place in a location of the user’s preference. Users will find the SNTbackup as a resource which allows folders such as directories to be back-up in no time....

Words: 1666 - Pages: 7

Free Essay

The Room

...In that place between wakefulness and dreams, I found myself in The Room. There were no distinguishing features save for the one wall covered with small index-card files. They were like the ones in libraries that list titles by author or subject in alphabetical order. But these files, which stretched from floor to ceiling and seemingly endlessly in either direction, had very different headings. As I drew near the wall of files, the first to catch my attention was one that read "Girls I Have Liked." I opened it and began flipping through the cards. I quickly shut it, shocked to realize that I recognized the names written on each one. And then without being told, I knew exactly where I was. This seemingly lifeless room with its small files was a crude catalog system for my life. Here were written the actions of my every moment, big and small, in a detail my memory couldn't match. A sense of wonder and curiosity, coupled with horror, stirred within me as I began randomly opening files and exploring their content. Some brought joy and sweet memories; others a sense of shame and regret so intense that I would look over my shoulder to see if anyone was watching. A file named "Friends" was next to one marked "Friends I Have Betrayed." The titles ranged from the mundane to the outright weird. "Books I Have Read," "Lies I Have Told," "Comfort I Have Given," "Jokes I Have Laughed At." Some were almost hilarious in their exactness: "Things I've Yelled at My Brothers." Others I couldn't...

Words: 1121 - Pages: 5

Premium Essay

Small Calims

...1. The small claims court I researched is Madison County, Alabama. http://www.madisoncountycircuitclerk.org/smallclaims.htm 2. There are different charges depending on the dollar amount of the claim. Below is the fee schedule: Small Claims (under $1,500.00) $63.00 Small Claims (under $1,500.00 if defendant is to be served by the Madison County Sheriff) $83.00 Small Claims (from $1,501.00 to $3,000.00 $141.00 Small Claims (from $1,501.00 to $3,000.00 if defendant is to be served by the Madison County Sheriff) $161.00 Additional Defendant $10.00 (add an additional $20.00 for each person to be served by the Madison County Sheriff - along with the $10.00) Additional Plaintiff Small Claims and District Civil $50.00 (Max. $500.00) 3. The maximum dollar amount allowed in a small claims case in my state is $3,000.00. 4. Individuals can represent themselves with or without an attorney. 5. The following information is required to be included: plaintiff name, defendant name, plaintiff and defendant’s home address, plaintiff’s attorney, additional defendant’s and addresses, complaint information (sum of small claim being file and reason small claim is being filed.) and the date of the filing. 6. I learned the fee schedule for filing a claim in the small claims court as well as the maximum dollar amount allowed in a small claims case. You do not have to have an attorney. I thought you would have to...

Words: 291 - Pages: 2

Free Essay

Records Organization

...Records Organization There is variances and parallels amongst small, medium, and large facilities regarding how patient's records are organized. There are also differences in how loose paper records are maintained. Likewise, I have noticed the majority of facilities prefer that their loose records are anchored in their charts. This makes sense to me because it prevents the loose reports from coming up missing or lost. However, the size of facility seems to regulate how the facility systematizes its patient's files. The most prevalent methods of organization I have seen include chronologically, form numbers, report types, and categories. While reviewing the interview threads, I observed many similarities and many differences in how patient files are controlled. For example, the medium and large facilities are most likely to use electronic documenting than paper ones, thus eliminating the threat of misplaced records. The most common variance I perceived was in whether or not the facilities use paper files versus electronic files. Almost all of the medium and large facilities are using electronic files with all records immediately filed with the patient's main file. In contrast, the smaller facilities seem more likely to use paper files. Records are filed with the patient's main record right away or by the end of the day. This makes it easier in locating a file and also prevents loss of files. In conclusion, all small, medium, or large facilities take exceptional attention in the...

Words: 268 - Pages: 2