Wednesday, December 25, 2019

Questions I Wish People Would Stop Asking Vegans and Vegetarians - Free Essay Example

Sample details Pages: 3 Words: 866 Downloads: 4 Date added: 2019/06/18 Category Health Essay Level High school Tags: Vegetarian Essay Did you like this example? I had my first date 6 months ago, with a guy named Damon. Damon had taken me out for pizza at my favorite pizza place, Little Italia Pizzeria in the Berkshire Mall. We were sitting towards the front of the small shop, sipping on our sodas. Damon had ordered a Barbeque Chicken Pizza slice. I couldnt help but be just a LITTLE disappointed. I thought it would have been perfect if by some miracle, he was vegetarian too. Our pizzas was finally ready. As we began to eat our food, he offered me a piece of the barbeque chicken, I politely declined and kept eating my slice of pizza. To be honest, I was nervous to bring up the fact that I was vegetarian. I had been vegetarian for 4 years and had become well aware of the fact that, most people who arent vegetarians dont like hearing about it. On top of that, I didnt want to make him feel bad about what he was eating! Don’t waste time! Our writers will create an original "Questions I Wish People Would Stop Asking Vegans and Vegetarians" essay for you Create order As the years go by, I notice people usually respond to finding out Im vegetarian one of two ways. 1- they make fun of me for it or 2- they feel like I am silently judging them for eating meat! Which I am definitely not doing! I have no problem with people who eat meat! So what kind of questions do I get as a vegetarian? First one and most common would probably be, What do you eat? People forget how many of our favorite meals are already vegan or vegetarian! We have salads, lots of Chinese food options, and pasta! (My favorite!! And what I usually order at restaurants) I honestly barley think about meat! Growing up I had always wanted to become a vegetarian, mostly because of my love for animals! I also knew that it was the right thing to do! I would always tell my mother that I was officially going vegan but then by dinner time, I would smell the chicken and dig in! I didnt fully commit to being a vegetarian until I was 14 years old. I made this choice because I could no longer support an industry that was hurting millions of animals. Almost everyone in my life did not thing this would last ( I could see why!). They never failed to mention that I was missing so much every time we ate out together. The second most common question I receive is, Will it upset you if I order ____ When I am asked this question, I never know when to be flattered or annoyed. I understand that you are probably asking because you genuinely do not want to offend me, BUT I really couldnt care less if you eat meat!! Okay, maybe thats a little lie! I COULD care less if you ate meat or not. I wish people wouldnt eat so much meat. But I would never ever judge you for it. I ate meat for 13 years of my short 18 year old life before I became vegetarian and then vegan. Where do you get your protein from? How do you survive? This one is always a funny question to me. People assume that the only source of high protein is meats! Which is not the case! There is no shortage of high-protein vegan products! There are chickpeas, black beans, nuts, nut butters, tofu, quinoa, some grains, Hummus and pita, chia, and even broccoli! I know what youre thinking, broccoli? First off, who even likes broccoli, and second how much broccoli would you have to eat to get the right amount of protein? I remember I would always try and argue that broccoli was a good source of protein! If you could eat five pounds in one sitting But instead now I can just explain that we really dont NEED all that much protein. Its easy to get what we did need from simple and common foods. (like those listed above) Are your parents vegan too? This is a big question. Since I turned vegetarian at 14 people would always ask me, is your mom vegan too? Did she force you to do this? (haha) The answer is no. This was a decision I made on my own, and my mom and brother were still both meat eaters. As the years went on, my mom began to start asking me questions about veganism, a few months after that she started researching it on her own. Soon after, my mom made the switch to being a vegetarian. (where she happily stays) I was thrilled she made the switch. She still drinks milk and her coffee and makes salmon burgers, but she is almost entirely vegetarian! Although, I must admit, she still eats a Chick Fil A chicken strip every once in a while. But shes healthier then shes ever been! And she wasnt doing it for me. It was her choice. I must say, occasionally Ill smell some cooking meat and wonder if I should go back to eating meat, and maybe I will one day, but for now I am happy being vegan. Im doing th e best I can at it and the bets I can to educate those who ask questions like this.

Tuesday, December 17, 2019

Organizational Culture At Ivey Business Journal - 1351 Words

Organisational culture shared among all the members, with its values, principles, traditions and methods of working. It determines how an organisation functions, from industry side to individually. It could be an important asset which, if not managed well, can be a critical liability for the organisation. While a healthy and positive organisational culture could increase relationship between employees and employer, and together achieve the maximum performance for the company, a deleterious culture would lead to the downfall of the organisation, and eventually collapse. It is an advantage that requires good management skill, coordination and communication in order for the organisation to utilize it well. Beaudan and Smith (2000) at Ivey Business Journal stated that corporate cultures are mature and complex organisms. One must carefully and smartly shape the culture, and it is wise to nurture corporate culture as an asset, rather than a risk and liability. This essay explains both bene ficial and negative sides of organisational culture, along with case studies supported. Goffee and Jones (1996) research comments that a majority of well-established organisations changed their culture in order to secure its competitive advantage. While external factors such as economy, competitors strategies and government regulations might be critical for an organisation and its managers to concern, organisation culture is an internal, intangible gift. Dummay and Cuganesan (2011) claimedShow MoreRelatedTransformational Leadership918 Words   |  4 Pagesimprovement in the productive efficiency of the subordinates (Rowe Nejad, 2009). Answer 2 Major transnational companies such as General Motors and British Airways recruited and encouraged charismatic leaders to boost their marketing aspect of the business. According to the article it is argued that Charismatic leaders for the marketing departments of these companies have proved to be inspirational for the subordinates and have helped generate a great degree of innovation (In Search of True, 2012Read MoreCase Study : Hacienda Encantada Resort Spa 71271 Words   |  6 Pagesthese changes. On a business level, these changes perhaps would contain the transformation of the internal corporate ideologies as well as enhancements in the management of human resources in reaction to intensifying workplace diversity and the evolving necessities of the workforce. According to strategy + business, â€Å"skilled change managers, conscious of organizational change management best practices, always make the most of their company’s existing culture† (Strategy + Business, 2 014). ThereforeRead MoreAnalysis Of The Book Roaring Dragon Hotel 857 Words   |  4 Pagesconsequences faced by Hotel International Management and RDH employees to sustain in competitive business environment. It is one of the original three-star hotels in southwest China and a state owned enterprise (Grainger, 2008). Failure to recognize cultural norms and the relationship between employees, customers, and contractors will result in dramatic failure of modernization and an effective business plan (Grainger, 2008). â€Æ' Introduction: RDH is a state owned enterprise located in southwest ChinaRead MoreIvey – Development of a Multi-National Personnel Selection System2637 Words   |  11 PagesI. EXECUTIVE SUMMARY Description of company in general terms and its business areas, key players and their roles, and relevant time frame of the case. ComInTec AG Co (ComInTec) is a world leading industrial company with administration, sales offices and production plants in various regions in the world.1 The owner of the company, Peter Koenig, wants to have a new personnel selection system to be developed to fill 25 middle management positions in the Asian-Pacific (APAC) region2. He prefersRead MoreBusiness Ethics And Virtue Ethics1277 Words   |  6 PagesBusiness Ethics and Virtue Ethics There are many things that make a company unique and successful. The liberty of working in an organization in society today is that, companies are filled with many different individuals from all ways of life. It’s these people who bring something new, innovative and exciting to their line of work and often times you will find positively affect the others around them. Within my military profession it is the leadership and the culture of our environment that makesRead MoreThe Influence of a Companys Leadership and Culture on Its Business Ethics1541 Words   |  6 PagesDiscuss the ways in which a companys leadership and culture influence its business ethics Definition of Organizational Culture Organizational culture refers to the values and behaviors essential in the contribution or development of unique social and psychological environment with reference to an organization. This is an indication that organizational culture is inclusive of the expectations, philosophy, values, and experiences that focus on holding an organization together with the aim of enhancingRead MoreEmployee Engagement : Job Dissatisfaction1849 Words   |  8 PagesEMPLOYEE ENGAGEMENT â€Æ' Table of Contents INTRODUCTION 3 LACK OF EMPLOYEE ENGAGEMENT 3 Job dissatisfaction 4 Lack of communication 4 Work culture 4 Attitude, behavior and outcomes 5 EMPLOYEE ENGAGEMENT STRATEGIES 5 Connectivity between employer employees 6 Career opportunities 6 Focus on communication 6 Engage first line leaders 6 Create motivational culture 7 Motivation for the right employees 7 Communicate progress 7 Huge investments 7 FRAMEWORK AND PSYCHOLOGICAL MODEL 8 Openness to experience 8Read MoreRapid, Volatile, and Discontinuous Change: Impact on Strategic Management and Organizations1482 Words   |  6 PagesCourse Code Instructors Name Department/Faculty Institution Date Rapid, Volatile, and Discontinuous Change The main challenge to management is the creation and implementation of strategic approaches and tools that measure and build organizational capabilities, which continuously renew themselves and leap competition. Managers face the daunting task of creating novel methods which transcend traditional strategic approaches and tools, in a less stable, certain, and complex environment (VoepelRead MoreThe Role and Responsibility of Company Leadership in Shaping Organizational Culture1712 Words   |  7 PagesAccording to (Organic Workspaces, n. d) an organization’s culture refers to the observable, powerful forces in any organization, usually constituted by the employees’ shared values, beliefs, symbols, and behaviors. The organizational culture ideally influences its decisions and actions (Tharp, n. d). (Watkins, 2013) also defines organizational culture as a consistent and observable pattern of behavior in organizations. An organization’s culture channelizes individua l decisions and actions at a subconsciousRead MoreCorporate Fraud, Greed, Corruption, And Ethics1598 Words   |  7 Pagescompany comes to mind when you hear those words? Enron! In this paper we will take a look into the corporate facts and history as well as, stakeholder relationships, organizational trust issues, ethical leadership and ethical culture at Enron. As well as where improvements could have been made to improve organizational trust and ethical culture before Enron’s collapse. II. Corporate Facts and History According to the Texas State Historical Association, organized in Omaha, Nebraska in 1930, InterNorth

Monday, December 9, 2019

Ancient Egypt Essay Conclusion Example For Students

Ancient Egypt Essay Conclusion Between 3100 and 332 B.C was the rise and climax of one of the richest and oldest ancient civilizations. Its lifeline was the Nile river in the Nile valley. Here, Egyptian dynasties ruled from the first cataract of the Nile to the Mediterranean Sea. At the its height it ruled an empire that reached from Syria in the east to Nubia in the south. In this report I will be covering the Archaic Period, the Old Kingdom, the Middle Kingdom the New Kingdom and The Late Period or 3100-332 B.C. Archaic Period: 3100 B.C to 2750 B.C There long history began with there first King who began the first Egyptian dynasty. In 3100 B.C Pharaoh Menes united upper and lower Egypt. Making Egypts first empire. In doing so, he made the Egyptian double crown. It was made by putting the red crown of Lower Egypt on top of the white crown of upper Egypt. Menes ruled from the ancient city of Thinis near Abydos. Under his reign the first hieroglyphic writing was made. He is also credited with making his empire interdependent. Old Kingdom: 2750 B.C to 2181 B.C / First Intermediate Period: 2182-2260 Little is known about Menes successors until the reign of Zoser at the end of the 3rd dynasty. His capital was located at Memphis on the Niles west bank. He built the worlds first pyramid and the first building of that size to be entirely made of stone. Even though it was a pyramid it wasnt a true pyramid, but a step pyramid. After the reign of the last king of the Sixth dynasty the last dynasty in the old kingdom. Pepi II in 2181 B.C, there was a period of crisis and social upheaval known as the First Intermediate Period. The reasons leading up to this dark time, was a series of low floods and the result was famine during the Sixth dynasty. This undermined the stability of Egypt and provoked rebellion. What followed put Egypt in rapid decline. With no central power the provinces became independent states the were often at war with each other. To make the situation worse was a penetration of nomadic foreigners into the delta region of the Nile Valley. Middle Kingdom: 2061-1784 B.C/Second Intermediate Period 1633-1570 B.C The accession in 2060 B.C. of Mentuhotep II of Thebes the first pharaoh of the Middle Kingdom, ended 90 years of conflict with a dynasty established a Herakleopolis, south of Memphis. This strong Eleventh Dynasty ruler restored order in Egypt. He drove the Asiatics from the delta and campaigned against the Libyans and nomadic tribes in the Sinai and the eastern desert. Trade also expanded to Nubia, Syria and Palestine under his reign. Mentuhotep II reigned for 50 years and was buried at Deir el-Bahri. Under the reign of Sesostris II 1897-1878 B.C huge irrigation works were built at the oasis at Faiyum. Sesostris III 1878-1843 expanded Egypts southern border to the second cataract. At such times of powerful rulers, Egypt was  governed by an efficient administration. Taxation provided much of the wealth and was carefully organized. A census of fields and of all cattle was taken every two years. In addition to tax calculation and collection, another important official function was the building up reserves of grain stocks to prevent famine after a bad harvest. The state controlled all foreign trade and owned the mines and quarries. After the end of the Thirteenth Dynasty in 1633 B.C Egypt fell into another period of decline known as the second intermediate period. During this period Egypt was divided into four areas: the southern area ruled by 17th dynasty Theban rulers, the central area that owed allegiance to Thebes, the 15th and 16th dynasties or the Hyksos that ruled most of the delta and the 14th dynasty that ruled a small are in the delta. .u4471e1656af401dc15679ebce8543f22 , .u4471e1656af401dc15679ebce8543f22 .postImageUrl , .u4471e1656af401dc15679ebce8543f22 .centered-text-area { min-height: 80px; position: relative; } .u4471e1656af401dc15679ebce8543f22 , .u4471e1656af401dc15679ebce8543f22:hover , .u4471e1656af401dc15679ebce8543f22:visited , .u4471e1656af401dc15679ebce8543f22:active { border:0!important; } .u4471e1656af401dc15679ebce8543f22 .clearfix:after { content: ""; display: table; clear: both; } .u4471e1656af401dc15679ebce8543f22 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #95A5A6; } .u4471e1656af401dc15679ebce8543f22:active , .u4471e1656af401dc15679ebce8543f22:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #2C3E50; } .u4471e1656af401dc15679ebce8543f22 .centered-text-area { width: 100%; position: relative ; } .u4471e1656af401dc15679ebce8543f22 .ctaText { border-bottom: 0 solid #fff; color: #2980B9; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .u4471e1656af401dc15679ebce8543f22 .postTitle { color: #FFFFFF; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .u4471e1656af401dc15679ebce8543f22 .ctaButton { background-color: #7F8C8D!important; color: #2980B9; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://artscolumbia.org/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .u4471e1656af401dc15679ebce8543f22:hover .ctaButton { background-color: #34495E!important; } .u4471e1656af401dc15679ebce8543f22 .centered-text { display: table; height: 80px; padding-left : 18px; top: 0; } .u4471e1656af401dc15679ebce8543f22 .u4471e1656af401dc15679ebce8543f22-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .u4471e1656af401dc15679ebce8543f22:after { content: ""; display: block; clear: both; } READ: Egyptian Art case EssayThe Hyksos identity is not known and there was no evidence that they invaded Egypt. This suggest that there takeover was peaceful as a result of their increased population in the delta. During the middle kingdom the Hyksos were employed by the state of Egypt to mine in the Sinai mines and in Egypt itself. Later their population in the delta was so large that it was larger than the Egyptian population the delta, so this was the probable cause of there takeover. The Hyksos rule over Egypt was very unpopular with the people of Egypt and according to tradition Hyksos were an anarchy, who were accused of burning temple and cities. But evidence suggest that the Hyksos respected and even adapted to the Egyptian culture and religion. And they also made many advances in many things. One of the more important things were the horse drawn chariots. Whatever the nature of the Hyksos rule they where still very unpopular. However one of the consequences of the Hyksos rule was the dramatic change in Egypts attitudes toward war and foreign conquest. And after a hundred years of rule, the Theban prince Seqenere began the struggle against the Hyksos, dying in battle of fatal head wounds. His son Kamose drove the Hyksos from Middle Egypt and took Avaris. In 1570 B.C he was succeeded by his younger brother Ahmosis, who drove the Hyksos out of Egypt persued them into Palestine and eliminated them in a series of campaigns. The New Kingdom 1570-1045 After a decade of fighting Egypt was restored and Ahmosis formed the most illustrious 18th dynasty of The New Kingdom or The Empire. And once again Egypt. The founder of this Illustrious family died in 1546 B.C. Under a series of rulers once again controlled Syria, Palestine and Nubia. And under the reign of Amenophis II Egypt expanded its empire beyond the Fourth Cataract. One of the many new lands that were conquered was Kush. And soon Egypt was depending on Kushs mines for gold. And the capital moved to Thebes. Egypts power and prosperity were largely the result of the exploits of a few kings. Thuthmosis I  campaigned as far as the Euphrates and first brought Syria and Palestine under Egyptian rule. Following the reign of Hatshepsut the widow of Tuthmosis II, her nephew and stepson Tuthmosis III reasserted Egyptian authority over kingdoms in Asia and came in conflict with Mitanni. Under Tuthmosis IV, a peace treaty was concluded between these powers and sealed by dynastic marriage. Toward the end of Amenophis III reign, the Hittites sacked Mitannis capital and began to dominate Egypts land in Syria. Egyptian influence in the area collapsed. After the reign of Horemheb 1348-1320 B.C the 18th dynasty was over and the 19th dynasty began. The first ruler of the new dynasty was Ramesses I. His reign of 2 years was succeeded by his son, Seti I who did much to restore Egypts prestige. There was one campaign against the Libyans and he also campaigned in the east and restored Egyptian control over Palestine. Egypt came into conflict with the Hittites in Syria, but by the end of Seti Is reign, the two powers seemed to come to an understanding. Setis son Ramesses II resumed hostilities and attacked the Hittites under King Muwatallis at Qadesh. The details of this encounter for the control of Syria are know because Ramesses had it recorded as a great victory on several temples. In fact the result was indecisive, and both armies suffered heavy losses. The rest of Ramesses IIs reign was fairly peaceful and prosperous. Nubia was still under his control, although there seemed to be difficulty in the production of gold. He also moved his capital north to Pi-Ramesse. Under his successors, Egypt fell into a period of decline. Merneptah fought and defeated invading Libyans, who were allied with the Sea People. In the reign of the Twentieth Dynasty pharoah Ramesses III, Egypt was once again attaked Libyans and the Sea People. Three campaigns were fought in the Delta before the invaders were beaten. .uce535e2e9dbb2111fadf5b686535c3a7 , .uce535e2e9dbb2111fadf5b686535c3a7 .postImageUrl , .uce535e2e9dbb2111fadf5b686535c3a7 .centered-text-area { min-height: 80px; position: relative; } .uce535e2e9dbb2111fadf5b686535c3a7 , .uce535e2e9dbb2111fadf5b686535c3a7:hover , .uce535e2e9dbb2111fadf5b686535c3a7:visited , .uce535e2e9dbb2111fadf5b686535c3a7:active { border:0!important; } .uce535e2e9dbb2111fadf5b686535c3a7 .clearfix:after { content: ""; display: table; clear: both; } .uce535e2e9dbb2111fadf5b686535c3a7 { display: block; transition: background-color 250ms; webkit-transition: background-color 250ms; width: 100%; opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #95A5A6; } .uce535e2e9dbb2111fadf5b686535c3a7:active , .uce535e2e9dbb2111fadf5b686535c3a7:hover { opacity: 1; transition: opacity 250ms; webkit-transition: opacity 250ms; background-color: #2C3E50; } .uce535e2e9dbb2111fadf5b686535c3a7 .centered-text-area { width: 100%; position: relative ; } .uce535e2e9dbb2111fadf5b686535c3a7 .ctaText { border-bottom: 0 solid #fff; color: #2980B9; font-size: 16px; font-weight: bold; margin: 0; padding: 0; text-decoration: underline; } .uce535e2e9dbb2111fadf5b686535c3a7 .postTitle { color: #FFFFFF; font-size: 16px; font-weight: 600; margin: 0; padding: 0; width: 100%; } .uce535e2e9dbb2111fadf5b686535c3a7 .ctaButton { background-color: #7F8C8D!important; color: #2980B9; border: none; border-radius: 3px; box-shadow: none; font-size: 14px; font-weight: bold; line-height: 26px; moz-border-radius: 3px; text-align: center; text-decoration: none; text-shadow: none; width: 80px; min-height: 80px; background: url(https://artscolumbia.org/wp-content/plugins/intelly-related-posts/assets/images/simple-arrow.png)no-repeat; position: absolute; right: 0; top: 0; } .uce535e2e9dbb2111fadf5b686535c3a7:hover .ctaButton { background-color: #34495E!important; } .uce535e2e9dbb2111fadf5b686535c3a7 .centered-text { display: table; height: 80px; padding-left : 18px; top: 0; } .uce535e2e9dbb2111fadf5b686535c3a7 .uce535e2e9dbb2111fadf5b686535c3a7-content { display: table-cell; margin: 0; padding: 0; padding-right: 108px; position: relative; vertical-align: middle; width: 100%; } .uce535e2e9dbb2111fadf5b686535c3a7:after { content: ""; display: block; clear: both; } READ: Egyptian mythology and the Bible EssayAlthough most of Ramesses III reign was prosperous and the king made many gifts to the temples, toward the end there were problems. First there was a strike because monthly food rations were overdue. More serious was the discovery that several of his wives and officials in his harem were in a plot to kill him. As punishment, some of the plotters were allowed to kill themselves, while others lived, but got there noses and ears off. The next eight pharohs were all called Ramesses, and under them Egypt lost the what was left of its empire and became increasingly unstable. The Late Period: 1045-332 B.C This was the downfall of Egypt and was the last intermediate period. After the end of the 20th Dynasty Egypt was divided between the High Preist at Thebes and the Vizier of lower egypt, Smendes who ruled from Tanis. And as usual, at times when Egypt was in turmoil conquerors came. In this case the Libyans once again attacked and settled in the delta. In 747 B.C the Nubians came to power, but it  was shortlived fore the Assyrians overran the Nubians in 667 B.C. Between the years of 663-525 B.C the Egyptians became independent under th 26th dynasty. Then in 605 B.C The Babylonians conquered Egypt, then in 539 B.C the Persians defeated the Babylonians and conquered Egypt. Then finally in 332 B.C Alexander the Great of Macedonia Conquered Egypt and built his city of Alexandria. Conclusion In conclusion I think Egypt is by far the least warlike civilization of its time. I think this because it only fighted invaders and not until the New Kingdom did it conquer foreign lands on the large scale.

Monday, December 2, 2019

Men And Women What Influences A Persons Identity Is It Their Homes,

Men and Women What influences a person's identity? Is it their homes, parents, religion, or maybe where they live? When do they get one? Do they get it when they understand right from wrong, or when they can read, or are they born with it? Everyone has one and nobody has the same, is there a point in everyone's life when they get one? A person's identity is his own, nobody put it there and nobody can take it out. Everyone in this world has a different identity because they all make their own over the course of their life. A person's identity also causes a person to have masculine and feminine traits. There is no one thing that gives a person their identity, there are however many different factors that contribute to one's identity. What is someone's identity? Is it the way they look, the way they dress, or it could be many things all put together, or is it none of the above? To me someone's identity is a part of their being. Nobody will ever hold it, touch it, or even see it, but it is there. Everybody has one, it guilds your decision making, your thoughts, ideas, and dreams. You may think something is terrible while someone else does not even care and yet another person may laugh, why? The answer is simple, everyone has his own identity and personality. Everyone feels, acts, thinks, and dreams differently. People may have some of these things in common with one another, but they will not be totally the same, it is like a fingerprint, unique. There are many origins to a person's identity, their family, friends, home life, religion, environment and others. But how does it get there, you do not go into a store and pick on off the shelf. A person's identity is developed over many years and put together by the person themselves. It comes from the individuals ability to think, reason and form an opinion. Nobody has the same mind, or the same or the same conscious, so how could anyone have the same identity as another. A person's identity is developed over many yea rs from the time they become aware of their surroundings, to the time they decide if they are going to college, and even as they grow old there identity will change with them. As people's dreams are dreamed and goals are accomplished their identities will change with the individual. Their aspirations and values will change, causing their identities to change with it. It may be a slight alteration or a major overhaul but there identity will adjust to the person. One of the factors of forming an identity will obviously be your family. One's family if invaluable to them. Your family may not be your biological parents or ever a blood relative at all, but nobody in this world can live from birth without some one. But no matter who it is, they will be the people who take care of you when you are sick or aid you when you need help. These people will be there with you for a long time and yes they will have a major impact on what you turn out to be it the future. A lot off people are fortun ate enough to live with a mother and a father, they may ever have some brothers and sisters to play with as they grow up. But ever with the same family influences, brothers and sisters still do not have the same identities Some may even say having a ?traditional? family would be bad for the development of an identity. For example, what kind identity would a young girl develop if see repeatedly saw her father beat on her mother. She would probably not feel the same as another girl whose father always showed love and caring for her mother. What about a teenager who used drugs as often as he changed his underwear. Would his younger brother, in looking up to him, feel the same as another boy who grew up never seeing an illegal drug before. If family members have no regard for keeping the other members of the family on the right Men And Women What Influences A Persons Identity Is It Their Homes, Men and Women What influences a person's identity? Is it their homes, parents, religion, or maybe where they live? When do they get one? Do they get it when they understand right from wrong, or when they can read, or are they born with it? Everyone has one and nobody has the same, is there a point in everyone's life when they get one? A person's identity is his own, nobody put it there and nobody can take it out. Everyone in this world has a different identity because they all make their own over the course of their life. A person's identity also causes a person to have masculine and feminine traits. There is no one thing that gives a person their identity, there are however many different factors that contribute to one's identity. What is someone's identity? Is it the way they look, the way they dress, or it could be many things all put together, or is it none of the above? To me someone's identity is a part of their being. Nobody will ever hold it, touch it, or even see it, but it is there. Everybody has one, it guilds your decision making, your thoughts, ideas, and dreams. You may think something is terrible while someone else does not even care and yet another person may laugh, why? The answer is simple, everyone has his own identity and personality. Everyone feels, acts, thinks, and dreams differently. People may have some of these things in common with one another, but they will not be totally the same, it is like a fingerprint, unique. There are many origins to a person's identity, their family, friends, home life, religion, environment and others. But how does it get there, you do not go into a store and pick on off the shelf. A person's identity is developed over many years and put together by the person themselves. It comes from the individuals ability to think, reason and form an opinion. Nobody has the same mind, or the same or the same conscious, so how could anyone have the same identity as another. A person's identity is developed over many yea rs from the time they become aware of their surroundings, to the time they decide if they are going to college, and even as they grow old there identity will change with them. As people's dreams are dreamed and goals are accomplished their identities will change with the individual. Their aspirations and values will change, causing their identities to change with it. It may be a slight alteration or a major overhaul but there identity will adjust to the person. One of the factors of forming an identity will obviously be your family. One's family if invaluable to them. Your family may not be your biological parents or ever a blood relative at all, but nobody in this world can live from birth without some one. But no matter who it is, they will be the people who take care of you when you are sick or aid you when you need help. These people will be there with you for a long time and yes they will have a major impact on what you turn out to be it the future. A lot off people are fortun ate enough to live with a mother and a father, they may ever have some brothers and sisters to play with as they grow up. But ever with the same family influences, brothers and sisters still do not have the same identities Some may even say having a ?traditional? family would be bad for the development of an identity. For example, what kind identity would a young girl develop if see repeatedly saw her father beat on her mother. She would probably not feel the same as another girl whose father always showed love and caring for her mother. What about a teenager who used drugs as often as he changed his underwear. Would his younger brother, in looking up to him, feel the same as another boy who grew up never seeing an illegal drug before. If family members have no regard for keeping the other members of the family on the right

Tuesday, November 26, 2019

The Great Gatsby Study Guide

The Great Gatsby Study Guide The Great Gatsby, published in 1925, is F. Scott Fitzgeralds most famous novel. Set during the Roaring 20s, the book tells the story of a group of wealthy, often hedonistic residents of the fictional New York towns of West Egg and East Egg. The novel critiques the idea of the American Dream, suggesting that the concept has been corrupted by the careless pursuit of decadence. Though it was poorly received in Fitzgerald’s lifetime, The Great Gatsby is now considered a cornerstone of American literature. Plot Summary Nick Carraway, the narrator of the novel, moves to the Long Island neighborhood of West Egg. He lives next door to a mysterious millionaire named Jay Gatsby, who throws extravagant parties but never seems to show up at his own events. Across the bay, in the old-money neighborhood of East Egg, Nick’s cousin Daisy Buchanan lives with her unfaithful husband Tom. Toms mistress, Myrtle Wilson, is a working-class woman married to mechanic George Wilson. Daisy and Gatsby were in love before the war, but they were separated due to Gatsby’s lower social status. Gatsby is still in love with Daisy. He soon befriends Nick, who agrees to help Gatsby rekindle his affair with Daisy by acting as go-between. Gatsby and Daisy restart their affair, but it is short lived. Tom soon catches on and becomes furious over Daisys unfaithfulness. Daisy chooses to stay with Tom due to her unwillingness to sacrifice her social position. After the confrontation, Daisy and Gatsby drive home in the same car, with Daisy driving. Daisy accidentally hits and kills Myrtle, but Gatsby promises to take the blame if need be. Myrtle’s suspicious husband George approaches Tom about the death. He believes that whoever killed Myrtle was also Myrtles lover. Tom tells him how to find Gatsby, suggesting that Gatsby was the driver of the car (and thus indirectly suggesting that Gatsby was Myrtles lover). George murders Gatsby, then kills himself. Nick is one of only a few mourners at Gatsby’s funeral and, fed up and disillusioned, moves back to the Midwest. Major Characters Jay Gatsby. Gatsby is a mysterious, reclusive millionaire who climbed from a poor upbringing to immense wealth. Hes an idealist fixated on grandeur and romance, but his relentless attempts to woo Daisy and free himself from his past only brings more tragedy upon him. Nick Carraway. Nick, a bond salesman whos new to West Egg, is the narrator of the novel. Nick is more easygoing than the wealthy hedonists around him, but he is easily awed by their grand lifestyles. After witnessing the fallout from Daisy and Gatsby’s affair as well as the careless cruelty of Tom and Daisy, Nick becomes more jaded and leaves Long Island for good. Daisy Buchanan. Daisy, Nicks cousin, is a socialite and flapper. She is married to Tom. Daisy displays self-centered and shallow characteristics, but the reader occasionally sees glimmers of greater depth beneath the surface. Despite renewing her romance with Gatsby, she is too unwilling to give up the comforts of her wealthy life. Tom Buchanan. Tom, Daisys husband, is wealthy and arrogant. He also displays hypocrisy, as he regularly carries on affairs of his own but becomes furious and possessive when he realizes Daisy is in love with Gatsby. His anger over the affair leads him to mislead George Wilson into believing his wife had an affair with Gatsby- a lie that ultimately results in Gatsbys death. Major Themes Wealth and Social Class. The pursuit of wealth unites most of the characters in the novel, most of whom live a hedonistic, shallow lifestyle. Gatsby- a â€Å"new money† millionaire- finds out that even immense wealth does not guarantee crossing over the class barrier. In this way, the novel suggests that there is a significant difference between wealth and social class, and that social mobility is more illusory than the characters think. Love. The Great Gatsby is a story about love, but it is not necessarily a love story. No one in the novel truly feels â€Å"love† for their partners; the closest anyone comes is Nick’s fondness for his girlfriend Jordan. Gatsby’s obsessive love for Daisy is the center of the plot, but he is in love with a romanticized memory rather than the real Daisy. The American Dream. The novel critiques the American Dream: the idea that anyone can achieve anything if they work hard enough. Gatsby works tirelessly and acquires enormous wealth, but he still winds up alone. The misfortune faced by the novels wealthy characters suggests that the American Dream has become corrupted by the greedy pursuit of decadence and wealth. Idealism. Gatsby’s idealism is his most redeeming quality and his biggest downfall. Although his optimistic idealism makes him a more genuine character than the calculating socialites around him, it also leads him to hold onto hopes that he should let go of, as symbolized by the green light he stares at across the bay. Historical Context Fitzgerald was famously inspired by both the Jazz Age society and the Lost Generation. The novel is steeped in the historical context of the era, from flapper and bootlegging culture to the explosion of â€Å"new money† and industrialization. In addition, Fitzgerald’s own life was reflected in the novel: like Gatsby, he was a self-made man who fell in love with a bright young ingenue (Zelda Sayre Fitzgerald) and strived to be â€Å"worthy† of her. The novel can be read as Fitzgerald’s attempt to critique Jazz Age society and the concept of the American Dream. The decadence of the era is portrayed critically, and the idea of the American Dream is depicted as a failure. About The Author F. Scott Fitzgerald was a key figure in the American literary establishment. His work often reflected on the excesses of the Jazz Age and the disillusionment of the post-World War I era. He wrote four novels (plus one unfinished novel) and over 160 short stories. Although he became something of a celebrity in his lifetime, Fitzgeralds novels didn’t achieve critical success until they were rediscovered after his death. Today, Fitzgerald is hailed as one of the great American authors.

Saturday, November 23, 2019

Bullying Case Study Analysis through the Major Psychology Studies

Bullying Case Study Analysis through the Major Psychology Studies Bullying Case Study Analysis through the Major Psychology Studies Once upon a time, there was a girl named Sarah who went to school with children, studied in the university with other students or worked in an office with white collars. In fact, that doesn’t matter who, how old, and where she was. The thing is that she was kinda different, no matter how, maybe she was a bit taciturn, or liked a special type of food, or followed a separate religion, and because of that, Sarah often got picked on. Just because she was not like everyone else. Loads of people have been in Sarah’s shoes and got bullied because of the race, religion, social, gender or national differences, and, the chances are that they consider bullies the real villains. In some measure, that is the truth because every person has a choice. However, we would like you to have a look at the issue from a different perspective – the share of social impact on the bullying phenomenon. Stanford Prison Experiment Let’s consider any bullying case study in terms of the most popular psychological studies, and Stanford Prison Experiment is one of them. Regular students were placed in jail and were given roles: prisoners and guards. After some time, they got into the characters so much that guards assaulted prisoners psychologically and physically without any hints from the research team, and â€Å"convicts† accepted the abuse like normal behavior. After 6 days, the experiment was stopped. The result of the experiment stated that the reasons for such course of actions were not certain personalities of the participants or predisposition for violence, but the situation and environment were put in. Sounds familiar? The Third Wave Studying fascism in one of California high schools, students couldn’t understand how German people could have accepted the Nazi regime. In fact, they claimed that they would never join the movement willingly. To prove them wrong, the history teacher promoted some concepts mimicking certain peculiar features of the Nazi regime. After 5 days, the movement following these concepts got out of control, and the teacher gathered a meeting explaining what happened. Bullying appears as a result of stereotypes and standards set too high. The society itself produces bullies who pick on people refusing to follow the â€Å"correct† and approved by the majority rules. Asch Conformity Experiments Solomon Asch studied the phenomenon of people following the crowd. His most famous experiments consisted of placing real participants with fake ones. The real subjects of the studies had to give correct answers to different questions, but only after the fake ones had responded first (opting for a wrong variant). During the first sessions, participants answered correctly, but after some rounds, they followed the crowd and chose wrong variants. As you can see, these experiments prove the social nature of bullying. We don’t protect bullies by any means. We’re just saying that before blaming them for all the evil in the world, you should address bigger issues and raise people’s awareness about something like fakely set social standards if you really want to change the situation. Be smarter than those who follow the crowd. At service, we can provide you with case study analysis help from reliable writers.

Thursday, November 21, 2019

The importance of analysis and analitical skills to the manager making Essay

The importance of analysis and analitical skills to the manager making decisions in business - Essay Example Business opportunity of get fit quick Competition, coupled with increased changes in the business environment, has combined to execute powerful impact on the way managers and their different organizations conduct businesses. In this regard, organizations have been forced to develop and implement the most sophisticated decision-making techniques in order to ensure available resources are economically and optimally utilized. In order for business to get fit quickly and successfully, managers are required to explore the different available alternatives of decision-making. The alternatives should have the ability to outline, in the most efficient way, how the organization can make use of the available resources in a way that differs from competitors and give returns that enable the business to create competitive advantage (Casey and Capella University 2006). Available resources in an organization can be used in ways that provide opportunity for the organization to achieve maximum utility. However, this is possible through selecting the best alternatives of decision-making as it pertains to resource utilization, environmental scanning, and goals to be achieved. Approaches of decision-making process Management literature depicts that decision-making process can benefit greatly from the four main approaches that are generally used in making decisions. As a result, in order for decision-making process to be successful and productive, managers are either to select one or multiple approaches that include logical systems approach, contingency approach, quantitative approach, and the qualitative approach. Logical systems of decision-making are premised on the rationality essence that is needed to make decisions (Wysocki 2010). In this case, an individual (manager) is perceived to have rational set of stages that should be followed before arriving at the appropriate conclusion regarding decision (Wysocki, 2010). Contingency approach on the other hand categorizes or program alternatives that can be used to achieve decision goals (Sengupta and Bhattacharya, 2006). A problem is presented to have different ways of solving it and this lead to development and evaluation of different ways of finding solution. On the other hand, quantitative approaches dictate that, decision-making process succeed when concept such as project management are adopted (Anderson, 2011). In this way, figures are seen to possess great ability of providing management with chances of finding solut

Tuesday, November 19, 2019

Kindly see the instructions Essay Example | Topics and Well Written Essays - 750 words

Kindly see the instructions - Essay Example According to McLagan, Human resource development is a systematic integrated use of training and development, organizational and career development to enhance personal and institutional effectiveness (p23). The primary point of focus in HRD is the training and enhancement of employee capabilities. HRD has been adopted as one of the fundamental courses taught at schools in most of the countries. This paper presents the importance of learning HRD, interests developed, the lessons learnt, and the goals of a prospective human resource manager. Human resource development is a crucial component of the school curriculum course. The reason to study HRD is that it assists students to acquire the skills necessary in preparation to hit the industry which involves, influencing the human capital of an organization in order to bring positive effect on the financial results or outcomes of that organization. The market position has dynamically changed to be very competitive and as a consequence of obsolesce in technology; the product cycle has been shorted further annually. These circumstances or incidents demand for constant changes on every virtue of enterprise working, more precisely at the levels of operations. Such changes need lively collaboration of employees and their support in the efforts of reengineering roles and skill up-gradation. In such cases the organizations should come up with new relations to effectively manage and contain the crisis. With the knowledge of HRD being part of studies, one may be at a supreme advanta ge to make wise decisions and judgments on how jobs are to be redesigned. Learning also HRD as part of the courses taught at school enables one to understand the ever-changing labour market, understand the expectations of the people joining the work force before going to the industry. Therefore attending a HRD class is unavoidable if one has to be a resourceful HRD manager in future. Learning HRD leaves important messages in reflection of

Sunday, November 17, 2019

Navy Uniform Regulations Essay Example for Free

Navy Uniform Regulations Essay In dress uniform, civilian bags will be hand carried only.  All bags worn with the working uniform must conceal its contents and be either solid black or navy blue. No personal ornamentation. No tattoos/body art/brands that are prejudicial to good order, discipline and morale or are of nature to bring discredit upon the Navy are prohibited. Do not wear skirts or dress shoes aboard ship. Do not wear corfam shoes for normal work aboard ship, only when immediately departing or returning to the ship. Same applies for V-Neck/Sleeveless shirts. SOPA – Senior Officer Present Afloat Hair cut for men – Hair above the ears and around the neck shall be tapered from the lower natural hairline upward at least  ¾ inch and outward not greater than  ¾ inch to blend with hairstyle. Hair shall be no longer than 4 inches and may not touch the ears, collar, extended below eyebrows when headgear is removed, show under front edge of headgear, or interfere with properly wearing military headgear. Bulk shall no proceed 2 inches. Color must look natural and compliment the individual. Sideburns shall not extend below a point level with the middle of the ear, shall be of even width (not flared) and shall end with a clean-shaven horizontal line. Hair for women – The hair may touch, but not fall below a horizontal line level with the lower edge of the back of the collar. With jumper uniforms, hair may extend a maximum of 1- ½ inches below the top of the jumper collar. Bulk shall not exceed 2 inches. A maximum of 2 small barrettes/combs/clips, similar to hair color, may be used un the hair. Hairnets shall not be worn. Hair ornaments shall not present a safety hazard.

Thursday, November 14, 2019

Its Time to End Poverty in America Essay -- Break the Cycle of Povert

For those who live an impoverished life, it is difficult to participate in society. They are left behind in our cultural movement because they lack the necessities to be on an equal level with the rest of society. Because the poor cannot get their basic needs for life, they cannot improve their well-being; therefore, our society as a whole cannot efficiently move in new directions. As Jo Goodwill Parker states in "What is Poverty," she does not have luxuries. Luxuries of the impoverished are what we would consider our basic needs such as food, water, transportation and shelter. Simply getting adequate food is difficult, but not the main problem for the poor. As Parker states, her children "do not suffer from hunger, [her] seventy-eights dollars keeps [them] alive, but they do suffer from malnutrition" (63). The poor also suffer from a lack of clean water. Their water is often dirty and can not be heated to clean it or to clean anything else properly because of their lack of funds for gas and electricity. Parker must wash the dishes she has "in cold water and no soap ... hot water is a luxury. [She] does not have luxuries" (61). The money for the soap that she cannot afford must be saved for her baby's diapers, and she can not afford to use it for anything else. The poor can not afford soap, nor can they afford transportation, whether it is a car or publi c transportation. Those who are not lucky enough to live in an area with public transportation must find other means to get around. As Parker says, she must find a way to pay her neighbor "one way or another" for the rides to the health clinic (63). For those of us who have easy access to transportation, it is hard to imagine living without a vehicle in our family a... ...ng, then our nation will soon run into the problem that countries like Angola have, where the rich are rich but the poor are barely alive and there is no in between. If our efforts to advance ourselves in science and other areas cannot be put to use to improve the well-being of everyone living on our country and make a difference, then we need to change them. Poverty is a problem throughout the nation, and we must do something to correct it. The United States government and its citizens must focus its efforts to prevent and stop poverty in order to keep it from being a wide spread epidemic. Works Cited Awalt, Chistopher L. "Brother, Don't Spare a Dime" Dubuclet and Polster 66-68. Dubuclet, Mallory, and Kristen Polster, eds. The Mercury Reader. Dallas: Pearson Custom Publishing, 2004. Parker, Jo Goodwin. "What is Poverty?" Dubuclet and Polster 60-64.

Tuesday, November 12, 2019

Object Oriented Programming in Different Languages

OOP with Microsoft Visual Basic . NET and Microsoft Visual C# Step by Step by Robin A. Reynolds-Haertle Microsoft Press  © 2002 (393 pages) ISBN: 0735615683 This intuitive, self-paced learning title is designed to help you master the basics of object-oriented programming with Visual Basic. NET or Visual C#. Table of Contents OOP with Microsoft Visual Basic . NET and Microsoft Visual C# . NET Step by Step Introduction Chapter 1 – Writing Your First Object-Oriented Program Chapter 2 – Creating Class Instances with Constructors Chapter 3 – Creating Fields and PropertiesChapter 4 – Working with Methods Chapter 5 – Using Inheritance to Create Specialized Classes Chapter 6 – Designing Base Classes as Abstract Classes Chapter 7 – Responding to Changes with Events and Exceptions Chapter 8 – Putting It All Together with Components Chapter 9 – Providing Services Using Interfaces Chapter 10 – Using Classes Interchangeably T hrough Polymorphism Chapter 11 – Using Shared and Static Members Chapter 12 – Overloading Operators with Visual C# Chapter 13 – Saving Instance Data Chapter 14 – Reducing Complexity by DesignAppendix – Additional Resources Index Height Gage List of Sidebars OOP with Microsoft Visual Basic . NET and Microsoft Visual C# . NET Step by Step PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright  © 2002 by Robin A. Reynolds-Haertle All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Cataloging-in-Publication Data Reynolds-Haertle, Robin A. , 1959-OOP with Microsoft Visual Basic . NET and Microsoft Visual C# Step by Step / Robin A. Reynolds-Haertle. p. cm. Includes bibliographical references and index. ISBN 0-7356-1568-3 1. Object-oriented programming (Computer science). 2. Microsoft Visual BASIC. 3. C# (Computer program language) I. Title. QA76. 64 . R495 2001 005. 2’768—dc21 2001052122 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWT 7 6 5 4 3 2 Distributed in Canada by Penguin Books Canada Limited. A CIP catalogue record for this book is available from the British Library.Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www. microsoft. com/mspress. Send comments to: [email  protected] com. IntelliSense, Microsoft, Microsoft Press, Visual Basic, Visual C#, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.Other product and company names mentioned herein may be the trad emarks of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Acquisitions Editor: Danielle Bird Project Editor: Kathleen AtkinsTechnical Editor: Jack Beaudry Body Part No. X08-42192 MICROSOFT LICENSE AGREEMENT Book Companion CD IMPORTANT—READ CAREFULLY:This Microsoft End-User License Agreement (â€Å"EULA†) is a legal agreement between you (either an individual or an entity) and Microsoft Corporation for the Microsoft product identified above, which includes computer software and may include associated media, printed materials, and â€Å"online† or electronic documentation (â€Å"SOFTWARE PRODUCT†).Any component included within the SOFTWARE PRODUCT that is accompanied by a separate End -User License Agreement shall be governed by such agreement and not the terms set forth below. By installing, copying, or otherwise using the SOFTWARE PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you are not authorized to install, copy, or otherwise use the SOFTWARE PRODUCT; you may, however, return the SOFTWARE PRODUCT, along with all printed materials and other items that orm a part of the Microsoft product that includes the SOFTWARE PRODUCT, to the place you obtained them for a full refund. Software PRODUCT LICENSE The SOFTWARE PRODUCT is protected by United States copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold. 1. GRANT OF LICENSE. This EULA grants you the following rights: a. Software Product. You may install and use one copy of the SOFTWARE PRODUCT on a single computer.The primary user of the computer on which th e SOFTWARE PRODUCT is installed may make a second copy for his or her exclusive use on a portable computer. b. Storage/Network Use. You may also store or install a copy of the SOFTWARE PRODUCT on a storage device, such as a network server, used only to install or run the SOFTWARE PRODUCT on your other computers over an internal network; however, you must acquire and dedicate a license for each separate computer on which the SOFTWARE PRODUCT is installed or run from the storage device.A license for the SOFTWARE PRODUCT may not be shared or used concurrently on different computers. c. License Pak. If you have acquired this EULA in a Microsoft License Pak, you may make the number of additional copies of the computer software portion of the SOFTWARE PRODUCT authorized on the printed copy of this EULA, and you may use each copy in the manner specified above. You are also entitled to make a corresponding number of secondary copies for portable computer use as specified above. . Sample Cod e. Solely with respect to portions, if any, of the SOFTWARE PRODUCT that are identified within the SOFTWARE PRODUCT as sample code (the â€Å"SAMPLE CODE†): i. Use and Modification. Microsoft grants you the right to use and modify the source code version of the SAMPLE CODE, provided you comply with subsection (d)(iii) below. You may not distribute the SAMPLE CODE, or any modified version of the SAMPLE CODE, in source code form. ii. Redistributable Files.Provided you comply with subsection (d)(iii) below, Microsoft grants you a nonexclusive, royalty-free right to reproduce and distribute the object code version of the SAMPLE CODE and of any modified SAMPLE CODE, other than SAMPLE CODE, or any modified version thereof, designated as not redistributable in the Readme file that forms a part of the SOFTWARE PRODUCT (the â€Å"Non-Redistributable Sample Code†). All SAMPLE CODE other than the Non-Redistributable Sample Code is collectively referred to as the â€Å"REDISTRIBU TABLES. † iii. Redistribution Requirements.If you redistribute the REDISTRIBUTABLES, you agree to: (i) distribute the REDISTRIBUTABLES in object code form only in conjunction with and as a part of your software application product; (ii) not use Microsoft’s name, logo, or trademarks to market your software application product; (iii) include a valid copyright notice on your software application product; (iv) indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, including attorney’s fees, that arise or result from the use or distribution of your software application product; and (v) not permit further distribution of the REDISTR IBUTABLES by your end user. Contact Microsoft for the applicable royalties due and other licensing terms for all other uses and/or distribution of the REDISTRIBUTABLES. 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS. †¢ Limitations on Reverse Engineering, Decompilation, and Disassembly. You may not reve rse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. †¢ Separation of Components. The SOFTWARE PRODUCT is licensed as a single product.Its component parts may not be separated for use on more than one computer. †¢ Rental. You may not rent, lease, or lend the SOFTWARE PRODUCT. †¢ Support Services. Microsoft may, but is not obligated to, provide you with support services related to the SOFTWARE PRODUCT (â€Å"Support Services†). Use of Support Services is governed by the Microsoft policies and programs described in the user manual, in â€Å"online† documentation, and/or in other Microsoft-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and subject to the terms and conditions of this EULA.With respect to technical information you provide to Microsoft as part of the Support Services, Microsoft may use such information for its business purposes, including for product support and development. Microsoft will not utilize such technical information in a form that personally identifies you. †¢ Software Transfer. You may permanently transfer all of your rights under this EULA, provided you retain no copies, you transfer all of the SOFTWARE PRODUCT (including all component parts, the media and printed materials, any upgrades, this EULA, and, if applicable, the Certificate of Authenticity), and the recipient agrees to the terms of this EULA. †¢ Termination.Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts. 3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photogr aphs, animations, video, audio, music, text, SAMPLE CODE, REDISTRIBUTABLES, and â€Å"applets† incorporated into the SOFTWARE PRODUCT) and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, ou must treat the SOFTWARE PRODUCT like any other copyrighted material except that you may install the SOFTWARE PRODUCT on a single computer provided you keep the original solely for backup or archival purposes. You may not copy the printed materials accompanying the SOFTWARE PRODUCT. 4. U. S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252. 27-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software Restricted Rights at 48 CFR 52. 227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399. 5. EXPORT RESTRICTIONS. You agree that you will not export or re-export the SOFTWARE PRODUCT, any part thereof, or any process or service that is the direct product of the SOFTWARE PRODUCT (the foregoing collectively referred to as the â€Å"Restricted Components†), to any country, person, entity, or end user subject to U. S. export restrictions. You specifically agree not to export or re-export any of the Restricted Components (i) to any country to which the U. S. as embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to, Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country; (ii) to any end user who you know or have reason to know will ut ilize the Restricted Components in the design, development, or production of nuclear, chemical, or biological weapons; or (iii) to any end user who has been prohibited from participating in U. S. export transactions by any federal agency of the U. S. government. You warrant and represent that neither the BXA nor any other U. S. ederal agency has suspended, revoked, or denied your export privileges. DISCLAIMER OF WARRANTY NO WARRANTIES OR CONDITIONS. MICROSOFT EXPRESSLY DISCLAIMS ANY WARRANTY OR CONDITION FOR THE SOFTWARE PRODUCT. THE SOFTWARE PRODUCT AND ANY RELATED DOCUMENTATION are PROVIDED â€Å"AS IS† WITHOUT WARRANTY OR CONDITION OF ANY KIND, EITHE R EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE PRODUCT REMAINS WITH YOU. LIMITATION OF LIABILITY.TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY CASE, MICROSOFT’S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS EULA SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE PRODUCT OR US$5. 00; PROVIDED, HOWEVER, IF YOU HAVE ENTERED INTO A MICROSOFT SUPPORT SERVICES AGREEMENT, MICROSOFT’S ENTIRE LIABILITY REGARDING SUPPORT SERVICES SHALL BE GOVERNED BY THE TERMS OF THAT AGREEMENT.BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY, THE ABOVE LIMITATION MAY NOT APPLY TO YOU. MISCELLAN EOUS This EULA is governed by the laws of the State of Washington USA, except and only to the extent that applicable law mandates governing law of a different jurisdiction. Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052- 6399. PN 097-0002296 For Bruce You’re still the one.About the Author Robin A. Reynolds-Haertle Robin’s interest in computing began when she taught herself to program in C to fulfill a programming language requirement for her master’s degree in biomathematics at the University of Washington. Fascinated by the subject, Robin attended as many computer science classes as her schedule would permit, and took a position as a programmer with the University of Washington after graduation. Robin spent several years in the biotechnology industry, writing dat a applications in various database management systems, C, and Microsoft Visual Basic.Not content to just read computer science and software engineering books, she then pursued and completed a master’s degree in software engineering at Seattle University. During these years, Robin presented training sessions on software engineering topics to her peers. After so many years in the classroom, Robin wanted to try teaching, and jumped at the opportunity to teach object- oriented programming with Visual Basic for the University of Washington Outreach program. Here she discovered she loved writing instructional materials and sample projects for her students. This led Robin to her current position as a programmer/writer at Microsoft, writing conceptual documentation for Visual Basic and Microsoft Visual C#.When not at the computer, Robin is trying to make peace with her abandoned husband and sons. After she completes this book, they look forward to Mom’s attention to Cub Scouts , Boy Scouts, hiking, and watching BattleBots. After catching up with the family, Robin hopes to sew a few quilts. Acknowledgments First I’d like to thank the team at Microsoft Press that turned my writing into a book. Without Jack Beaudry, the technical editor, I never would have gotten any sleep. His meticulous reviews saved me time and saved readers from much frustration. Kathleen Atkins, the project editor, kept everything running smoothly and improved my text considerably.Credit is also due to Danielle Bird, acquisitons editor; Rebecca McKay (Becka), manuscript editor; Cheryl Penner and Rebecca Wendling (Becky), copy editors; Gina Cassill, compositor; and Michael Kloepfer, electronic artist. I also want to thank my colleagues at Microsoft who listened sympathetically to my complaints about deadlines and beta software. Editors Roger Haight and Meredith Waring made me a better writer. Mike Pope reminded me to put the reader ahead of being clever. Megan Shult and Ann Morris , my managers, were supportive even when writing consumed all my after-hours energy. Much of what I learned about . NET came from the material written by my team members Jina Chan, Seth Grossman, Steve Hoag, Steve Stein, and Matt Stoecker. And thank you to Diana Rain, my office mate.I’d also like to thank Ruth McBride, my longtime manager, and my instructors at Seattle University. I appreciate their patience with my often experimental approaches to their assignments over the years. I also have to mention the friends that still call to check on me, even though I haven’t called them in months. Jennifer Wirt, Lisa Wiken, Molly Potteiger, and Julie Brinkley have been true friends. This book would never have been written without the support of my husband, Bruce. He completely ran my life for the seven months I was writing this book. I worked and wrote; he did everything else. My friends are still laughing about how he RSVPs for me.Lastly, I thank my sons for just being ther e and for being proud of me. Introduction Microsoft Visual Basic developers have long clamored for complete objectoriented language support. Microsoft Visual Basic . NET supports all the features of an object- oriented language. In addition, the entire Microsoft . NET Framework, which includes the development support for Microsoft Windows applications, Web applications, Web services, graphics, and data access, is designed according to object-oriented principles. Developers who have a firm grasp of object-oriented principles will be the strongest . NET developers.Also new to developers is C#, a C-based language that gives developers a language choice for developing with the . NET Framework. Some C, Java, and C++ development will move to C# to take advantage of . NET’s features. Visual Basic programmers looking to learn a C language might also move to C#. Visual Basic . NET and C# both support object-oriented development with the . NET Framework. No matter what language you cho ose for development, being able to read code in either language will double your access to Microsoft Visual Studio documentation, . NET books, magazine articles, and other developer resources. System RequirementsYou’ll need the following hardware and software to complete the exercises in this book:  ¦  ¦ Microsoft Visual Studio . NET Professional edition. The Visual Studio . NET software isn’t included with this book. You must purchase it separately and install it before you can complete the exercises in this book. A computer capable of running Microsoft Visual Studio . NET. The following hardware configuration is recommended by the Microsoft Visual Studio . NET Web site, at http://msdn. microsoft. com/vstudio/nextgen/ Computer/Processor PC with a Pentium II–class processor, 450 megahertz (MHz); Pentium III–class processor, 600 MHz recommendedOperating System Microsoft Windows 2000, Server or Professional Microsoft Windows XP Home or Professional Micr osoft Windows NT 4. 0 Server Memory Windows 2000 Professional, 96 megabytes (MB) of RAM; 128 MB recommended Windows 2000 Server, 192 MB of RAM; 256 MB recommended Windows XP Professional, 128 MB of RAM; 160 Recommended Hard Disk 500 MB on System Drive and 3. 0 gigabyte (GB) on installation drive Drive CD-ROM drive Display VGA or higher–resolution monitor Computer/Processor Input Device Microsoft Mouse or compatible pointing device Finding Your Best Starting Point This book is designed to teach you the fundamentals of object-oriented programming.You can use this book if you have a basic knowledge of Visual Basic 6, Visual Basic . NET, Visual C#, or another Windows programming language. The exercises in this book assume you can already perform the following tasks:  ¦ Create a new Windows Application project, build it, and run it.  ¦ Add Windows Forms controls to a Windows Form.  ¦ Create a method to respond to the Click event of a Button control.  ¦ Create a simple meth od (called a Sub or Function in Visual Basic . NET).  ¦ Declare and use variables. For an introduction to Visual Basic . NET, read Microsoft Visual Basic . NET Step by Step by Michael Halvorson (Microsoft Press, 2002).For an introduction to Visual C# , read Microsoft Visual C# . NET Step by Step by John Sharp and Jon Jagger (Microsoft Press, 2002). Use the following table to find your best starting point in this book. If you are New To object- oriented programming Migrating From Visual Basic 6 Switching From another object- oriented programming Follow these steps Install the practice files as described in the following section, â€Å"Installing and Using the Practice Files† Work through the chapters sequentially for a complete introduction to object-oriented programming. Chapters 1 through 7, 9, and 11 concentrate on the mechanics of object- riented programming, while the other chapters cover the concepts in more depth. Install the practice files as described in â€Å"Inst alling and Using the Practice Files† on the next page. Work through the chapters sequentially for a complete introduction to object- oriented programming with Visual Basic .NET. Chapters 1 through 7, 9, and 11 concentrate on the mechanics of object- oriented programming, while the other chapters cover the concepts in more depth. Install the practice files as described in â€Å"Installingand Using the Practice Files. † If you are New language. Referencing The book after working through the exercises Follow these steps Complete Chapter 1 to learn the basic yntax of properties and methods. Read the Quick Reference sections at the end of the chapters for information about specific class constructs. Use the index or the Table of Contents to find information about particular subjects. Read the Quick Reference at the end of each chapter to find a brief review of the syntax and techniques presented in the chapter. Installing and Using the Practice Files The companion CD inside the back cover of this book contains the practice files that you’ll use as you perform the exercises in the book. For example, when you’re learning to create class events, you’ll use a bitmap file named Train. bmp.By using the practice files, you won’t waste time creating objects that aren’t relevant to the exercise. Instead, you can concentrate on learning object-oriented programming with Visual Basic . NET and Visual C# . NET. The files and the step-by-step instructions in the lessons also let you learn by doing, which is an easy and effective way to acquire and remember new skills. Important Install the practice files Before you break the seal on the OOP with Microsoft Visual Basic . NET and Microsoft Visual C# Step by Step companion CD package, be sure that this book matches your version of the software.This book is designed for use with Microsoft Visual Studio . NET Professional Edition for the Windows operating systems. To find out what softw are you’re running, you can check the product package or you can start the software, and then click About Microsoft Development Environment in the Help menu at the top of the screen. Follow these steps to install the practice files on your computer’s hard disk so that you can use them with the exercises in this book. 1. Remove the companion CD from the package inside the back cover of this book and insert the CD in your CD-ROM drive. 2. Double-click the My Computer icon on the Desktop.Tip On some computers, the startup program might run automatically when you close the CD-ROM drive. In this case, skip steps 2 through 5 and follow the instructions on the screen. 3. Double-click the icon for your CD-ROM drive. 4. Double-click StartCD. exe 5. Click Install Sample Code. The setup program window appears with the recommended options preselected for you. For best results in using the practice files with this book, accept these preselected settings. 6. When the files have been installed, remove the CD from your CD- ROM drive and replace it in the package inside the back cover of the book.A folder called OOPVBCS has been created on your hard disk, and the practice files have been placed in that folder. Using the Practice Files Each lesson in this book explains when and how to use any practice files for that lesson. The practice files contain the complete source listings for all the applications created in this book, as well as any resources, such as bitmaps and databases, that you’ll need to complete the exercises. For those of you who like to know all the details, here’s a list of the Visual Basic and Visual C# projects on the practice disk: Project Chapter 1 ReadBooks Chapter 2 ReadMoreBooks Chapter 3 CodeAnalysis CodeAnalysis2 Chapter 4DeckOfCards Chapter 5 TheBank ARoundButton Chapter 6 ABetterBank ABetterLibrary Variations Description This simple program demonstrates the basics of creating, instantiating, and using a class. This program expands on the ReadBooks program and adds constructors. These two applications demonstrate different approaches to using class properties, and the interaction of class properties and the DataGrid control. This application explores class methods by using dynamic creation of Windows Forms controls and drag-and-drop operations. This simple application demonstrates the basics of class inheritance. This small project shows how easy it is to derive rom a Windows Forms control and redefine its drawing. This adaptation of Chapter 5’s TheBank application uses an abstract class as a base class. This improvement on Chapter 1’s ReadBooks application uses a strongly typed collection. This application contains code snippets demonstrating variations on inheritance. Chapter 7 TrainGame ThrowSystemException PersonList Project Chapter 8 GamesLibrary Memory Chapter 9 MoveIt Points Chapter 10 PatternMaker Chapter 11 BetterCard SortablePoint Singleton Chapter 12 VectorAlgebra Chapter 13 S erialize DataSetExercise Chapter 14 This application introduces delegates, events, and user-drawn controls in the context of a simple game.This small program throws a system exception and recovers by using exception handling. This application creates and throws a custom application exception. Description The GamesLibrary project creates a component library containing objects used to develop the simple Memory card game This application covers the basics of creating and implementing an interface. The Points project contains objects that implement the IComparable, IFormattable, and IEnumerable interfaces. Moving beyond the basics of inheritance, the PatternMaker program makes extensive use of inheritance and polymorphism. This improvement on the Card class from Chapter 4 uses static methods to liminate the project’s dependency on file locations. The SortablePoint application from Chapter 10 is made more flexible through static properties. Static fields are used to implement the Singleton design pattern. The mathematical concept of vectors is used to demonstrate the definition and use of operator overloading in Visual C#. The Serialize application demonstrates the use of binary and XML serialization of data. This very simple ADO. NET application reads data from an Access database. PatternMaker Uninstall the practice files This example uses the PatternMaker exercise from Chapter 10 to demonstrate the way to make design changes after the i nitial development of an application.If you are using the Windows XP Professional operating system, follow these steps to remove the practice files from your computer. If you are using a different version of Windows, refer to your Windows Help documentation for removing programs. 1. Click Start, and then click Control Panel. 2. In Control Panel, click Add Or Remove Programs. 3. In the Add Or Remove Programs window, click OOP Visual Basic And C# . NET Code in the Currently Installed Programs list. 4. Click Change/Remove. The Confirm File Deletion dialog appears. 5. Click Yes to delete the practice files. 6. Click Close to close the Add Or Remove Programs window. 7. Close Control Panel.Conventions and Features in this Book This book uses conventions designed to make the information more readable and easier to follow. The book also includes features that contribute to a deeper understanding of the material. Conventions  ¦ Each exercise is a series of tasks. Each task is presented as a series of numbered steps. If a task has only one step, the step is indicated by a round bullet.  ¦ Notes labeled â€Å"tip† provide more information for completing a step successfully.  ¦ Notes labeled â€Å"important† alert you to information you need to check before continuing. The book uses typographic styles to help organize the information presented. The following table describes the styles used. Style Code Italics Used for Code that you type in Method argument or parameter Event Procedure Field Ful ly Qualified Name Keyword Method Property value Example ‘ Visual Basic Public Class Book End Class // Visual C# public class Book { } aBook showPage_Click m_shelf SomeBook. Text Public, public, If, if GetPage listOfBooks Roman Other Features Boolean values Class name Control type Data type Event Form Namespace Parameter type Property True, true, False, false Book, Library, Train ListBox, TextBox String, string, Integer, int Click Form1 ReadBooks String, string, Integer, int NameShaded sidebars throughout the book provide more in-depth information about the exercise. The sidebars might contain debugging tips, design tips, or topics you might want to explore further. Each chapter ends with a Quick Reference section. The Quick Reference provides a brief review of the syntax and techniques presented in the chapter. Corrections, Comments, and Help Every effort has been made to ensure the accuracy of this book and the contents of the practice files on the companion CD. Microsoft Pre ss provides corrections and additional content for its books through the World Wide Web at http://www. microsoft. com/mspress/support/If you have problems, comments, or ideas regarding this book or the companion CD, please send them to Microsoft Press. Send e-mail to [email  protected] com Or send postal mail to Microsoft Press Attn: Step by Step Series Editor One Microsoft Way Redmond, WA 98052-6399 Please note that support for the Visual Studio . NET software product itself is not offered through the preceding address. For help using Visual Studio . NET, visit http://support. microsoft. com. Visit the Microsoft Press World Wide Web Site You are also invited to visit the Microsoft Press World Wide Web site at http://www. microsoft. com/mspress/You’ll find descriptions for the complete line of Microsoft Press books, information about ordering titles, notice of special features and events, additional content for Microsoft Press books, and much more. You can also find out the latest in Visual Studio . NET software developments and news from Microsoft Corporation at http://msdn. microsoft. com/vstudio/nextgen/ Check it out! Chapter 1: Writing Your First Object-Oriented Program Overview ESTIMATED TIME 2 hr. 30 min. In this chapter, you’ll learn how to  ¦ Decide which classes to implement in your program.  ¦ Create a class with fields, properties, and methods. Use a class in an application.  ¦ Use Microsoft Visual Studio . NET tools to create a class definition. Classes are the building blocks of object-oriented programs. Object-oriented program design is driven by the objects in the problem you need to solve. If your goal is to automate class registration, you might create classes for the instructor, student, and class schedule objects. Objects also have properties that describe them and their behavior. These are implemented as properties and methods of a class. Just as an instructor has a name, so does the Instructor class have a Name proper ty.To assign a student to a class, you’d need to find an open section in the schedule. So your ClassSchedule class might implement a FindOpenSection method. The method would likely check the variable, called a field, in the class in which you’ve stored information about sections. In this chapter, you’ll learn how to identify the objects in your problem domain and their properties and behaviors (methods). Using this analysis, you’ll design and implement the classes using property and method programming constructs. You’ll then declare and initialize the variables of the classes you’ve coded.Finally, you’ll implement the solution to your problem by calling the properties and methods of the class variables. Reading Books: Your First Object-Oriented Program Your task in this chapter is to implement a program that displays large text files in page- size pieces. Typically, your task begins with a specification, perhaps complete, perhaps not. The specification for Chapter 1 follows: You have downloaded on your computer the text of several books. You want to be able to select a book and read one particular page at a time. You also want to be able to set the length of a page. You’ve already decided which user interface you want to use; it’s shown here:As you look at the user interface, you can see that you need to add some controls to a Windows form: a ListBox, a RichTextBox, two NumericUpDown controls, and some labels. How will you store the texts of the books? How will you fill the list? How will you retrieve the correct page of the book that you want to read? You can use object-oriented programming to answer these questions. Designing the Classe s Before you can implement your classes, you must decide which classes you need. First you look for the objects in the problem. Having found the objects, you then look for properties, which are characteristics or qualities that belong to the object, and methods, w hich are behaviors of the object.You can choose from many ways to design the classes in an application. The approach presented here begins with a textual analysis of the problem. The nouns are selected as candidates for classes, while verbs become candidates for the methods. In the course of the analysis, you’ll eliminate many of the nouns as candidates, and you might discover classes that aren’t among the nouns in the specification. After you determine the objects, properties, and methods that belong to your classes, you can then write the class specification that you’ll use in the implementation. Find the classes . Read the problem statement, and find all the nouns. You have downloaded on your computer the text of several books. You want to be able to select a book and read one particular page at a time. You also want to be able to set the length of a page. 2. Eliminate candidates. Reasons to eliminate a candidate include  ¦ The class based on the noun would have only properties or only methods.  ¦ The class based on the noun wouldn’t be relevant to the problem.  ¦ The class based on the noun wouldn’t represent one object.You can eliminate the irrelevant candidates: computer and time. Length (of a page) is merely an integer value and wouldn’t generate enough behavior to qualify as a class. The same is true of text in this example—the only thing to be done with it is to display a piece of it, a page. By the same reasoning, page is also not a class. That leaves book and books. Books is just the plural of book , so you are left only with book as a potential class. But you aren’t finished yet. 3. Search for missing candidates. Consider this specification, â€Å"The dealer deals four cards to each player. There’s no mention of a deck of cards, although deck is a likely class in that problem. Remember eliminating books? Another class does, in fact, represent the properties and behavior of a grou p of books. You can call this class Library. The library concept is different from the book concept. A book has a title and text and can be read. A library contains many books, which can be checked out and returned. Left with the Book and Library classes, you can now search for properties and methods. Find the methods and properties 1. Read the problem statement, and find all the verbs. You can leave out the helping verbs, such as is, was, and have.As in the case of the nouns, textual analysis of verbs is just the starting point for finding the methods. You have downloaded on your computer the text of several books. You want to be able toselect a book and read one particular page at a time. You also want to be able to set the length of a page. 2. Consider each verb. Is it a method, or does it indicate a method? Is it relevant to the problem? Downloaded and want are clearly irrelevant to the problem. Select is an operation of the Library class. In a real library, this action would co rrespond to finding a book on the shelf and checking it out. So the Library has a CheckOut method.There’s also a hidden property here because a book needs a title. Read is an operation of the Book class. This method allows you to read one particular page, so it can be named GetPage. The verb set indicates that a property needs to be changed, and that property is the length of a page, PageLength. 3. The same nouns that you eliminated as classes might in fact be properties of those classes. Text, length (of a page), and page were eliminated as classes. A book does need text, so Text becomes a property of Book. You discovered that PageLength is a property in considering the verb set.Page represents one section of the text and represents the result of the GetPage operation, so it isn’t a property. 4. Look for missing properties and methods. If you’re going to check books out of the library, you need a way to add books to the library and return the checked-out books. A CheckIn method will handle this. Testing the Class Design Reread the problem, and determine whether your classes, with their properties and methods, provide the functionality necessary to solve the problem. You have downloaded on your computer the text of several books. Do you have a way of storing and organizing several books?Yes, you can create one Book for each book and one Library to store them all. You want to be able to select a book and read one particular page at a time. Can you select one book and read one page? Yes, books can be selected by their titles, and the GetPage method retrieves one page. You also want to be able to set the length of a page. Can you set the length of a page? Yes, the Book class has a PageLength property. The results are shown in the following table. The methods are shown as they might be declared in Visual Basic. Class Book Properties Integer PageLengt h Methods GetPage (pageNumber As Integer) As String Class Library Creating the Book Class Prop ertiesString Text String Title Methods CheckIn (aBook As Book) CheckOut(title As String) As Book The following exercise covers the basics of class implementation using the Book class as an example. To implement the Library class, you’ll use some of the development tools provided by the Microsoft Visual Studio . NET integrated development environment (IDE). Create the book class 1. In the IDE, click the File menu, point to New, and then click Project. The New Project dialog box opens. 2. Select Visual Basic Projects or Visual C# Projects in the Project Types tree, click Windows Application in the Templates list. 3.Enter ReadBooks in the Name box, and click OK. 4. Display the Solution Explorer by selecting Solution Explorer on the View menu. Click the ReadBooks project in the Solution Explorer. 12. On the Project menu, click Add Class. The Add New Item dialog box appears, as shown here: 13. Enter either Book. vb or Book. cs in the Name box, depending on the language you are usi ng. Note that the class name begins with a capital letter and is singular. 14. Click Open. The IDE adds a file to your project. The file includes the basic definition of a class, as shown in the following two screen shots.The Visual Basic class contains the minimum for a class declaration. Here’s the syntax for declaring a class in Visual Basic: Class ClassName End Class In this case, the class is named Book. The IDE adds the Public modifier that’s shown to indicate that the class can be used throughout the project. The Visual C# class contains the class declaration as well as a constructor. Here’s the syntax for declaring a class in C#: class ClassName {} A constructor contains code to initialize the fields of a class and perform other class initialization fun‘ctions. In C#, it has the same name as the class. A constructor isn’t required.I’ll talk more about constructors in Chapter 2, â€Å"Creating Class Instances with Constructors. † Add the Text and PageLength fields A field is a variable declared in a class block. Fields can be any . NET data type, such as Integer or Boolean; . NET class, such as TextBox or ListBox; or any class that you have created. 1. Locate the beginning of the class definition. In Visual Basic, the class definition begins immediately after the line that shows the class name. In Visual C#, the class definition begins after the opening curly brace of the class. 2. Add the following code inside the class to create Text and PageLength fields. 3. ‘ Visual BasicPublic Text As String = â€Å"† Public PageLength As Integer = 10 // Visual C# public string Text = â€Å"†;p public int PageLength = 10; Tip By convention, the initial letters of names of public members (fields, properties, methods, and events) of a class are capitalized (Textfield) or are intercapitalized (PageLength field). According to the code, you have specified initial values for the fields: the empty string for Text and 10 for PageLength. A basic tenet of object-oriented programming is that an object should maintain a consistent state. That means that the state of the object (the values of its fields) should represent a usable state.If you didn’t initialize the fields, values would default to â€Å"† for the Text field and 0 for the PageLength field. If those were acceptable values for a book, you could leave them uninitialized. But because compilers and their default values change, you can prevent maintenance problems by initializing the fields. Your client code (the code that uses a Book object) is able to read and write to any field declared with the public keyword (Public in Visual Basic and public in Visual C#). Providing direct access to the class data is a violation of the object-oriented principle of information hiding, which stipulates that the client has no knowledge of the underlying data structure of an object.In the next section, you’ll learn how to al low the client code to get and set the Title of the Book without giving away details about the implementation. Add the Title property A property is a programming construct that allows your code to get and set a value. Typically, the code in the property constructor will get and set the value of a private field in the class. In client code, a public field and a property are used in the same way—for example, SomeBook. Text and SomeBook. Title. 1. Add the following code to the Book class after the Text and PageLength declarations. 2. Private m_title As String ‘ Visual Basic private string m_title; // Visual C#This code creates a private field in the Book class. Client code doesn’t have access to this property. Tip Private fields of a class are declared using the m_ prefix to identify them as member data. Private field names aren’t capitalized. 3. Add the following code to the Book class, after the m_title declaration. 4. ‘ Visual Basic 5. Public Propert y Title() As String 6. Get 7. Return m_title 8. End Get 9. Set(ByVal value As String) 10. m_title = value 11. End SetEnd Property 12. // Visual C# 13. public string Title { 14. get { 15. return m_title; 16. } 17. set { 18. m_title = value; 19. }} These syntax blocks define class properties.The Title property appears in the IntelliSense drop-down list just like any other property, such as the familiar TextBox. Text or Form. Backcolor. The property block allows you to control access to the property. You can add validation code to the Set block to ensure that only reasonable values are assigned to the underlying m_title field. Note Please notice an important difference between fields and properties. A place is reserved in memory for fields. They contain the actual data of the class. Properties provide access to the data but are not data themselves. In this book, I use the word set to mean changing a property. I use the word get to mean retrieving the value of a property.The Get and Set blocks of a property can be called getters and setters, or accessors . The property block is more flexible than you’ve seen here. Properties can be public or private, read/write, read-only, or write-only. In Visual Basic, the property statements can even take a parameter. By the way, I cover properties in detail inChapter 2, but I need to talk about them at least a little bit in this chapter. A Little Bit About Properties We can use the word properties, in a general object-oriented sense, to mean the descriptive information about an object. We can also use properties to mean the particular syntactic construct provided by Visual Basic and C#.The particular meaning of the word can be determined by context. Use properties to validate class data and hide class implementation. You have to make a strong case for using public fields in a class. The addition of a property to a class to control access to the underlying data requires minimal effort. The benefit of this practice is tha t you can easily add validation or change the implementation if you need to without affecting clients already using your objects. Add the GetPage method  ¦ Add the GetPage method to the class definition after the field declarations. ‘ Visual BasicPublic Function GetPage(ByVal pageNumber As Integer) As String Dim start As Integer = (pageNumber -1) * PageLength If (start < Text. Length) And (start >= 0) Then If (start + PageLength) < Text. Length Then Return Text. Substring(start, PageLength) Else Return Text. Substring(start, Text. Length – start) End If Else Return â€Å"† End IfEnd Function // Visual C# public string GetPage(int pageNumber) { int start = (pageNumber – 1) * PageLength; if ((start < Text. Length) && (start >= 0)) { if ((start + PageLength) < Text. Length) { return Text.Substring(start, PageLength); } else { return Text. Substring(start, Text. Length – start); } } else { return â€Å"†; }} In Chapter 3, â€Å"Fields and Prop erties,† you’ll see how we can replace the GetPage method with a construct known as an indexer in Visual C# or with a default Item method in Visual Basic. The complete class definitions for our project are shown here: ‘ Visual Basic Public Class Book Public Text As String = â€Å"† Public PageLength As Integer = 10 Private m_title As String Public Property Title() As String Get Return m_title End Get Set(ByVal Value As String) m_title = Value End Set End PropertyPublic Function GetPage(ByVal pageNumber As Integer) As String Dim start As Integer = (pageNumber – 1) * PageLength If (start < Text. Length) And (start >= 0) Then If (start + PageLength) < Text. Length Then Return Text. Substring(start, PageLength) Else Return Text. Substring(start, Text. Length – start) End If Else Return â€Å"† End If End FunctionEnd Class // Visual C#using System;namespace ReadBooks{ /// /// Summary description for Book. /// public class Book { public strin g Text = â€Å"†; public int PageLength = 10; private string m_title; public Book() { // // TODO: Add constructor logic here // } public string Title { get { return m_title; } set { m_title = value; } } ublic string GetPage(int pageNumber) { int start = (pageNumber – 1) * PageLength; if ((start < Text. Length) && (start >= 0)) { if ((start + PageLength) < Text. Length) { return Text. Substring(start, PageLength); } else { return Text. Substring(start, Text. Length – start); } } else { return â€Å"†; } } }} Fields, properties, methods, and constructors can appear in any order in a class definition. Good organization benefits future readers of your code.Here’s a common organization and, in fact, the one I used in this book:  ¦ Field declarations  ¦ Constructors  ¦ Properties  ¦ Methods Using the Book Class in an Application You’ve just finished implementing the Book class. The class definition is just a template for an object. To put data in the fields and properties, you have to create an instance of the class in memory; this action is known as instantiation. When you create an instance, a section of memory is set aside to hold the fields of the object. If you create another instance of the class, another section of memory is set aside for its fields. You aren’t going to implement the full solution yet.First you need to write some code to test your class. You’ll create two instances of the Book class in the ReadBooks project, and you’ll display the fourth page of each book. (These will be very short books. ) You’ll create a cookbook and a book of fairy tales, so you’ll need to create two separate instances of the Book class. Instead of creating a fancy interface, you’ll write just enough code to see whether your class is working as you expected. Test Drivers A short program to test a class is called a driver. It’s a good idea to exercise your class a bit with a driver before adding the class to a larger program.Use the driver to test your class without the interference of other code in the program. Create an instance of Book 1. In the Solution Explorer, double-click Form1 to open it in the Windows form designer. If Form1 is opened in the code editor, select View, Designer. 2. Drag a button from the Toolbox onto Form1. If the Toolbox isn’t visible, select View, Toolbox. 3. Right -click the button, and click Properties on the shortcut menu. In the Properties window, set the Name property of the button to showPage and set the Text property to Show Page. The button on the Windows form is created from the Button class.Name and Text are properties of the Button class. So we can talk about getting and setting these properties. Form1 is a class as well, and the button you just created is a field of the Form1 class. 4. Double-click the button to create the Click event method. 5. Add the following code in boldface to the Click event to create a book of fairy tales. 6. ‘ Visual Basic 7. Private Sub showPage_Click(ByVal sender As System. Object, _ 8. ByVal e As System. EventArgs) Handles showPage. Click 9. Dim fairyTales As Book 10. fairyTales = New Book() 11. End Sub 12. // Visual C# 13. rivate void showPage_Click(object sender, System. EventArgs e) { 14. Book fairyTales; 15. fairyTales = new Book(); } 16. Add the following code to set the Text, PageLength, and Title properties immediately after the code you entered in step 5: 17. ‘ Visual Basic 18. fairyTales. Text = â€Å"Once upon a time there was a bear. † 19. fairyTales. PageLength = 8fairyTales. Title = â€Å"Fairy Tales† 20. // Visual C# 21. fairyTales. Text = â€Å"Once upon a time there was a bear. â€Å"; 22. fairyTales. PageLength = 8; fairyTales. Title = â€Å"Fairy Tales†;When the instance of Book is created, its fields contain the values specified in the class definition. The Text field is an empty string, the page length is 10, and the title is blank. Notice that it makes no difference in the client code whether you use a field or a property. 23. Add the following code after the fairyTales code to create another instance of the Book class. (This instance will be a recipe book. ) 24. ‘ Visual Basic 25. Dim cookies As Book = New Book() 26. cookies. Text = â€Å"Chocolate chip cookies are the most delicious co okies. † 27. ookies. PageLength = 8 28. cookies. Title = â€Å"Cookie Recipes† 29. // Visual C# 30. Book cookies = new Book(); 31. cookies. Text = â€Å"Chocolate chip cookies are the most delicious co okies. â€Å"; 32. cookies. PageLength = 8; cookies. Title = â€Å"Cookie Recipes†; In this case, you used a different syntax for declaring and initializing a variable of the Book class. Visual Basic and Visual C# allow declaration and initialization in the same statement. Declaring and initializing in the same statement has the following advantages:  ¦ Programmers ar e less likely to forget to initialize the variable. When a class defines a constructor with parameters, the fields can be initialized at the same time. (You’ll create constructors with parameters in Chapter 3. ) Use an instance of the Book class 1. Add the following code after the cookies code to display some of the text of the two books. In later chapters, you’ll learn other ways to return the text of a particular page in the book. 2. ‘ Visual Basic 3. Dim page As Integer = 3 4. Dim report As String 5. report = â€Å"Page † & page. ToString() & ControlChars. CrLf _ 6. & fairyTales. Title & â€Å": † & fairyTales. GetPage(page) _ 7. ControlChars. CrLf _ 8. & â€Å"Cookies: † & cookies. GetPage(page) 9. MessageBox. Show(report) 10. report = â€Å"Titles: † + fairyTales. Title & † and † & cookies. Title 11. MessageBox. Show(report) 12. // Visual C# 13. int page = 3; 14. string report; 15. report = â€Å"Page † + page. ToString() + † † 16. + fairyTales. Title + â€Å": † + fairyTales. GetPage(page) + † † 17. + cookies. Title + â€Å": † + cookies. GetPage(page); 18. MessageBox. Show(report); 19. report = â€Å"Titles: † + fairyTales. Title + † and † + cookies. Title; MessageBox. Show(report);This bit of code demonstrates that there are two separate instances of the Book class. We can refer to these instances using the variables fairyTales and cookies . The object-oriented concept that permits each instance to be referred to separately is known as identity. You’ll see in later chapters that the identity principle doesn’t mean that you have to create a variable for each instance. Creating so many variables is unwieldy if you need hundreds of instances of a class. Identity does mean that you can refer to each instance separately when you need to.Notice that when you created an instance of Book, the fields of fairyTales were change d and the GetPage method was called. Later on we retrieved the value of the Title property. The value of Title was unchanged after the GetPage method was called. The fact that the value was unchanged demonstrates the concept of object state, the idea that the fields retain their values between method calls. Compare the way the GetPage method works with a method that has variable declarations. After the GetPage method ends, the variables go out of scope and their values are lost to the application. 20. Press F5 to run the code. Click the Show Page button.The results are shown here: Click OK, and the book titles are displayed in a message box as shown here: Click OK, and then close the application. You’ve now created a class, Book, and two instances of it. Your code sent a message to the Book class through the GetPage method to ask for the third page of the text. In the next sections, you’ll implement another class, Library. This time, however, you’ll let some of the IDE tools do some of the syntactic work for you. Using the Class View The IDE provides a Class View that displays a tree view of the class structure of the project, namespaces, and classes.The Class View can share the same window as the Solution Explorer. On the View menu, click Class View to open the Class View. The expanded Class View is shown below for Visual Basic and Visual C#, respectively. The highest-level node represents the project, ReadBooks. The next level of nodes represents the namespaces in the project. A project can contain several namespaces; in this case, there’s only one. The project namespace contains two classes: the class that we created, Book, and the class for the Windows form, Form1. The Book class contains two public fields, PageLength and Text, epresented by blue blocks, and one private field, m_ti