Saturday, August 31, 2019
General Mills Motivational Profile
General Mills has been making food products for 150 years and is the 6th largest food producer in the world. Consumers recognize General Mills as the makers of Gold Medal flour, Cheerios cereal, and Betty Crocker cake mixes. But General Mills also produces Progresso soups and even the organic lines, Muir Glen and Cascadian Farms. Internationally, General Mills provides other products to 130 countries. Employees recognize General Mills as a positive place to work because of the companyââ¬â¢s commitment to a strong ethic of service, achievement, and integrity. General Mills encourages its employees to volunteer and gives five percent of every pre-tax dollar to charitable organizations. While taking care of communities, General Mills also takes care of its employees with benefits ranging from corporate childcare to a generous vacation package and flexible hours. Because employees feel valued and inspired, General Mills enjoys a very low rate of employee turnover. For more than 100 years, General Mills has been dedicated to enriching peopleââ¬â¢s lives. General Mills stands by its commitment to championship brands, championship people, championship innovation, and championship performance. The company develops superior products designed to make consumersââ¬â¢ lives ââ¬Å"easier, healthier, and more fun,â⬠(General Mills, Values, n. d. ) General Mills endorses a philosophy of community action, corporate social responsibility, and integrity. Since 2000, the company has donated five percent of its pre-tax profits to charitable organizations. In 2009, General Mills gave more than $90. million dollars to support education, food banks, and overseas development. For example, through General Millââ¬â¢s ââ¬ËAfrican Women and Childrenââ¬â¢s Hunger Project, experts share food growing technologies with villagers in Africa. 15,000 villagers now have access to grain processing equipment and 20,000 villagers have improved access to water for crop irrigation. General Millsââ¬â¢ culture of philanthropy extends to its employees. Over 82% of the companyââ¬â¢s volunteers report volunteering to their organization of choice or one supported by General Mills. Additionally, General Mills encourages charitable contributions by matching employeesââ¬â¢ donations, dollar for dollar, to nonprofit groups. They have given millions of dollars to support education, food banks, and the arts. In 2009, Forbes magazine ranked General Mills as the 4th most respected company in the United States and the 11th most respected company in the world. General Mills uses innovative strategies worldwide to reduce its environmental footprint, starting with its product packaging. The paperboard used for General Millsââ¬â¢ cereal is made from 100 % recycled paper, and has been for decades. The company is working toward reducing energy use by 15% and greenhouse emissions by 20% in the next year. General Mills has also set tough goals for creating healthier food products. Almost every product line is undergoing research and redevelopment to produce products that include more whole grains and less salt and sugar. General Mills believes in conducting business with integrity. The code of conduct report outlines the companyââ¬â¢s belief in maintaining the highest standards of quality in relationships, products, and conduct. The report states that the company will treat people fairly, keep its promises, and maintain the trust of consumers and investors. General Mills requires employee adherence to careful management of finances and assets, compliance with all local, national, and international laws, and the avoidance of conflicts of interest. General Mills has 30,000 employees worldwide and is the 6th largest food company in the world. With operations in over thirty countries, General Mills values a diverse workforce and has a strict no-discrimination policy. The company seeks talented, bright employees from many backgrounds. Additionally, General Mills places value on creating community partnerships throughout the world. Through respectful communication and an appreciation for different customs and cultural practices, the company has forged positive business and community relationships worldwide. General Mills is publicly held and includes a board, stockholders, and managers. The Chief Executive Officer and Chairman of the Board, Kendall J. Powell joined the company in 1979 as a marketing assistant. Over the years, he took on increasingly responsible positions and is an example of the companyââ¬â¢s commitment to developing its employees. Additional employees come from a variety of backgrounds, including marketing, health and nutrition, finance, production, research, and communications. General Mills ranked 155 on the Fortune 500 list of the best companies to work for and holds position 90 on Fortunes 1000 best companies to work for in 2010. This is up nine positions from 2009. The average annual pay in the most common professional job is approx $46,200. Not only is General Mills recognized by respected financial reporting businesses such as Fortune, but is highly regarded as a great place to work by its employees. One fact that supports the idea that General Mills is a great place to work is the company is named on Fortunes ââ¬Å"Top Company: Low Turnoverâ⬠list that includes companies with a 3% voluntary leave during the past 12-month period. With such a low turnover rate, the first question that comes to mind is ââ¬Å"What makes this company so great? â⬠One important factor may be that the company has several attractive family-friendly benefits. Recently the infant-care center at headquarters was expanded by 43 percent, and the company subsidizes 25 percent of infant care costs. This fact alone would certainly make this company an attractive choice to many family oriented workers. General Mills employs approximately 17,000 workers in the United States. General Mills reports that ââ¬Å"employees who lead healthy, fulfilling lives are more likely to make a strong contribution in the work place. â⬠There are a multitude of factors that support this believe and contribute to the low turnover rate recognized and reported in Fortune. Some of the supporting factors include: generous vacation time, paid holiday, and summer hour benefits. For example, from Memorial Day to Labor Day, headquarter employees are offered an option to work longer days Monday through Thursday and work a half day on Friday. Flexible work schedules and telecommuting when business conditions allow are available. The company also offers paid leave for new fathers and parents who are adopting children. General Mills has received many corporate recognition awards. A few notable recognitions include: Fortuneââ¬â¢s ââ¬Å"Americaââ¬â¢s Most Admired Companiesâ⬠and ââ¬Å"100 Best Companies to Work for. â⬠General Mills has also received recognition by Working Mother magazine as ââ¬Å"Best Companies for Woman of Color,â⬠Business Week ââ¬Å"Americaââ¬â¢s Top Giversâ⬠and Business Ethics ââ¬Å"100 Best Corporate Citizens. â⬠Another important note is General Millââ¬â¢s commitment to diversity may also play a major role in retaining employees for a longer period. General Mills published that they see diversity as a strategy rather than a policy. The company believes that his strategy gives them a global advantage as well as a competitive advantage when drafting and marketing products. Their commitment to this strategy is supported by the fact that they aggressively seek minority suppliers to provide the services that make their products possible. As part of this focus, they set minority business entrepreneur purchasing goals. They also develop relationships with national minority organizations and build employee support and development. With this in mind, I think it is clear that this company strives to stay focused on people. They understand reinforcing values that are important to people through happy employees, good brands, innovation and performance, will result in long term commitments from their employees and long term profits from their customers. On May 16, 2007, before the Joint Economic Committee, Scott A. Weisberg, Vice President, Compensation, Benefits, and Staffing for General Mills Incorporated stated, ââ¬Å"we strive to be a ââ¬Å"cradle-to-graveâ⬠employer, which means we hire many of our employees at the entry level and hope they spend their entire career with General Mills. We believe this continuity translates into performance and a competitive advantage in the marketplace. Our benefits package reflects this core philosophy ââ¬â our benefits are imbued with incentives to encourage people to stay. Our defined benefit pension program is one of our principal vehicles to reinforce employee retention. â⬠This is the philosophy that drives General Mills motivational strategies, which have resulted in an employee retention rate doubled that of their competitors. Their recruiting approach is to attract top candidates with the intention of keeping them for their entire working tenure to draw on their expertise as they evolve into mentors (Ziegler, 2009). General Mills acknowledges the success of the company is strongly connected to their employees. For these reasons, General Mills is one of the top companies to work for. When employees leave, especially long time employees, a significant loss of knowledge and experience leaves with them. The cost to search for and train new people is substantial. According to Kelly Baker, vice president of Corporate Diversity for General Mills, ââ¬Å"to attract and retain and keep those people very, very focused and productive we need to offer a place where they want to be (WCCO, 2008). â⬠General Mills achieves this by offering some of the most comprehensive benefit and incentive programs in the country. According to one employee, it was the benefits and incentives that attracted them to the company and has definitely keep them there (WCCO, 2008). Another employee commented about being more productive because of the on-site conveniences and concierge service (WCCO, 2008). The benefits and incentives offered by General Mills create a workplace that motivates employees intrinsically and extrinsically. These benefits and incentives are designed to help employees achieve a balance between work and home life. The motivational techniques applied by General Mills gives the company the ability to create a flexible, inclusive, and challenging workplace, which in turn drives productivity and innovation. If General Mills has one area in which they can improve, it would be how long employees have to wait for promotions. Low voluntary turnover is a double edged sword. The benefit of retaining employees is the knowledge base, work experience, reduced recruiting and training costs. The consequence is promotions are harder to come by because employees stay in the workforce longer. The risk to General Mills, they may see more voluntary turnover as younger workers decide to move on to companies in which the chance for promotion is more attainable. One approach General Mills could take is asking employees if there is a particular area of the company they are interested in learning. For example, a person in human resources may be interested in learning about strategic planning. The human resources employee is matched to a mentor in the strategic planning department and begins training. Now the human resources employee has the opportunity to promote in either department. As General Mills continues to grow and expand internationally, their strong vision of community partnerships and service will help them adapt to economic and cultural changes. General Mills will continue to provide high quality foods to consumers while fostering a work environment that elicits high performance from every employee.ReferencesGeneral Mills Corporate Website (2010) Careers. Why work at General Mills. A great place to work. Retrieved May 4, 2010, from http://www.generalmills.com/corporate/careers/basic_benefits.aspx General Mills (n.d.) General Mills Social Responsibility. Retrieved May 7, 2010 from http://www.generalmills.com/corporate/commitment/2010_CSR.pdf WCCO. (2008, May 29). Go inside 1 of the best places to work. Retrieved from http://wcco.com/business/best.work.places.2.736220.html Weisberg, S. (2007, May 16). Testimony to the joint economic committee. The economic impact of elder care. The employer perspective. Retrieved from http://jec.senate.gov/archive/Hearings/05.16.07%20Elder%20Care/Testimony%20-%20Weisberg.pdf Ziegler, S. (2009, May 21). General Mills is a place employees come to say. Star Tribune. Retrieved from http://www.startribune.com/business/44610022.html
Friday, August 30, 2019
Introduction to Baby Thesis Essay
Heavy metals such as lead, zinc, copper, can often be found in industrial wastewater and their discharge to the environment poses a serious threat due to their acute toxicity to aquatic and terrestrial life which includes humans. As a result of increasing industrialization more heavy metals are continually released to the environment and this has prompted environmental engineers and scientists to think of better methods by which heavy metal-bearing wastewaters can be treated effectively and economically. The most used way of removing heavy metals in wastewater is through the use of activated carbon which is used as an adsorbent. This is due to the adsorptive properties of activated carbon(Cecen & Aktas, 2011). Agricultural by-products represent a considerable quantity of harvested commodity crops. The use of by-products as precursors for the production of widely used adsorbents, such as activated carbons, may impart a value-added component of the overall biomass harvested. In most developing countries, the activated carbon is imported at high cost, limiting the quantities of safe drinking water available to the people (Gray, 2010, p. 72). In recent years, there has been research focusing on the use of appropriate, low cost technology for the treatment of drinking water in the developing world. Research has also been focused on the indigenous production of water treatment chemicals using locally available raw materials. Generally, the raw materials for the production of Activated Carbon are those with high carbon but low inorganic contents such as wood, lignite, peat and coal. Activated carbons form a large and important class of porous solids, which have found a wide range of technological applications. The characteristics of activated carbon depend on the physical and chemical properties of the precursor as well as on the activation method. In addition to the starting material and the oxidizing agent, activation time and temperature affect the structural properties of the resulting activated carbon (Hassler, 2009). A wide range of carbonaceous materials can be used as the carbon precursors such as coal, peat, wood and various agricultural by-products. Recently, agricultural by-products have received an increasing attention for the production of activated carbon due to their low-cost, renewability and wide prevalence (March & Reinoso, 2006). The production of value-added products such as activated carbon will enlarge its application, reduce waste materials and generate income to rural communities in Valenzuela. Heavy metal contamination exists in aqueous waste streams of many industries such as metal plating facilities, mining operations and tanners. Activated carbons were used as adsorbent materials because of their extended surface area, microporous structure, high adsorption capacity and high degree of surface reactivity. Furthermore, the presence of different surface functional groups on activated carbon, especially oxygen groups, leads to the adsorption of ions of heavy metals (Ilango, 2012, p. 22). One of the fastest growing research areas is the environmental applications of activated carbon, such as wastewater treatment. In the treatment of wastewater, it is used for purification, decolorization and the removal of toxic organics and heavy metal ions. year Chernicharo and Sperling (2005) stated that the demand of activated carbon increased over the years and the market growth was estimated at 4. 6 % per. This demand can be satisfied considering the large number of raw material available for the production of activated carbon (Bansal, & Goyal, 2005). The aim of the study was to produce activated carbon from local agroforestry wastes and assess the efficiency of the produced carbons in removing dyes and metal ions from wastewater. The researchers decided to use corncobs as the source of activated carbon to be used in the adsorption of heavy metals present in the waters of Manila Bay, this is because corncobs are widely available and inexpensive macromolecular waste in the agriculture in the Philippines. Bandosz (2006) studied the thermochemical reaction between corncob and CA and obtained a modified corncob, which had a large cation exchange capacity than natural corncob. Chemical analysis of the corncobs showed that it mostly consisted of 38. 4%, cellulose; 40. %, hemicelluloses; and 9. 1%, lignin. Modified ground corncobs using either 0. 6 M CA or phosphoric acid have improved natural adsorption capacity. Physical and chemical agents generated by human activities may often have various adverse effects on both aquatic and terrestrial Iife. Lead is an ubiquitous material in the environment and its presence in varying concentrations can be found in diverse locations. The Water Environment Federation (2010) reported that human exposure to lead has harmful effects on kidney, central nervous and reproductive systems. Air, food and water generally do not usually contain large amounts of lead, however excessive contamination of these natural sources by industrial activities can result in continuous toxic levels of exposure and consequently clinical poisoning (Ilango, 2012). In order to develop poisoning from organic lead, one has to be continuously exposed to concentrations higher than those in the general environment for some week or months. Lead exposure has both acute and chronic effects (Hassler, 2009). Another pertinent health problem of lead is bioaccumulation or magnification, which may elevate its concentration to toxic levels (Ilango, 2012). National Research Council Canada reported that fish could absorb lead through their body surface and the food they consume. As a case study the liver of sea bass caught near California Coast at Los Angeles was found to contain about 22 ppm Pb which is considerably higher than the permitted level of 10 ppm for human consumption and twice as high as the concentration in fishes found 300 km away; the major* of the lead was attributed to automotive aerosol (Bandosz 2006).
Thursday, August 29, 2019
Business Model and Strategic Plan Essay Example for Free (#3)
Business Model and Strategic Plan Essay Coffee (372) , Starbucks (158) , Strategic Plan (66) , Business model (48) company About StudyMoose Contact Careers Help Center Donate a Paper Legal Terms & Conditions Privacy Policy Complaints Why do businesses need innovation is simple, the world is changing at a rapid speed and no one can predict what is coming in the future. Organizations are facing many new types of vulnerabilities everyday. Innovation helps to determinate the strategic management within an organization and prepares organizations for the unforeseeable change and to make the change. Although very organization have different priorities, or balance the unique issues of their own, ignoring the innovation, or implementing the strategic plan inefficiently can bring risks of losing key employees, inefficiency of the operation, and lose competitive advantages to the competitors. This paper will create a new division for Starbucks Coffee Co. Using this division as an example to explain the importance of the innovation in companyââ¬â¢s vision, mission, and values, and how it related to strategic management. Starbucks Corporation, doing business as Starbucks Coffee, is an American global coffee company and coffeehouse chain based in Seattle, Washington. Today, with more than 21,000 stores in 65 countries, Starbucks is the premier roaster and retailer of specialty coffee in the world. And with every cup, the company strives to bring both their heritage and an exceptional experience to life. (Starbucks.com) Since the first Starbucks opened in 1971, the company has a goal to share great coffee with friends and help make the world a little better place. (Starbucks.com) To better server Starbucks Coffeeââ¬â¢s customers, and provide quick and easy coffee for the people who have to fight the morning or anytime traffic, Starbucks coffee co. has purposed a new business model of Self Severed Coffee Machine. This new Machine will be located outside of Starbucks stores, shopping centers, and large office buildings to better server the consumers who does not have time to wait in line and get their favorite cup of coffee. In this tough economic climate, Starbucks needs to compete smart, this means to stay a step head on ensuring the best response to customersââ¬â¢ need and demand. It is often to see a line of customers either inside the store or in the drive through. While we appreciate the their patience to wait in line, we also share their frustration. It is our intention to ensure everyone loves his or her coffee. While we are proud that every cup is made to earn our customersââ¬â¢ satisfaction, we are also spending a considerable amount of time on making them. The Self Served Starbucks machine has an ability of produce majority flavors of the coffee, which our customer likes. Simply pay the cash, wipe the credit card, or scan the mobile Starbucks App on your smartphone, the machine will make a fresh brew cup of coffee in just 45 seconds. With this machine outside of store or mall, our customer can save time on waiting in line. Even more convenient, the machines outside of the office building not only can save our customer a trip to the coffee shop in the morning, also be able to enjoy a hot fresh coffee when they sat down by their desk. This new machine can ensure the competitive advantage by its product differentiation, more focused group on customer service, and operational efficiency. Starbucksââ¬â¢ mission is a reason for the companyââ¬â¢s existence. With the unique style of combining both, our vision and mission statement is ââ¬Å"to inspire and nurture the human spirit ââ¬â one person, one cup and one neighborhood at a time.â⬠(Starbucks.com) To align with this mission statement, our new divisionââ¬â¢s mission statement is to â⬠bring the best quality coffee and convenience to our customers on the go, one machine at the timeâ⬠This mission statement reflected the company value and beliefs to show our costumers that we care, it will also guide our employees on understand and establish what the company truly does. A good mission statement inspires employees and provides a focus and direction for strategic planning. While mission statements vary from organization to organization and represent the distinctness of each one, they all share similar components. (Mission and Vision Statements, 2010) The new divisionââ¬â¢s mission statemen ts include descriptions of Starbucksââ¬â¢ target market, the geographic domain, and concern for survival, growth, and profitability. Being the giant leader of the coffee and snacks industry, Starbuck coffee company needs to develop a strong strategic plan through the analysis of SWOTT. SWOTT stands for strengths, weaknesses, opportunities, threats and trends. A SWOTT analysis identifies strengths and weaknesses within a company, and outside opportunities and threats. The most important parts of a SWOT analysis specify the actions that correspond to the elements the company identify. By using the results of the analysis to improve the situation of the new division, we can reduce the likelihood of developments that negatively affect the business while improving performance. (Smallbusiness.Chron.com) Starbuck is currently in the retail coffee and snacks industry. Theà self-serve coffee machine will be able to satisfy customers not just a cup of coffee but also tea, water and juice, which Starbuck currently provide in the store. The loyal based reward programs provide customers with convenience, giving presents, and increasing frequency of the machine visit. Although there will not be any customer service involved, but the efficiency of leveraging technology with the capability of mobile App will still attract customers. The machine will provide extra ideas on the screen related to recycling and reducing waste; this is a great way to communicate with people about the social responsibility initiatives of the company. Due to the economic crush in 2008, this industry has experiencing a major downfall in sales. Because of the sensitivities to the macroeconomic factors, most of industry consumers have to give up extra expenses such as over priced drinks, snacks, and food. However, with economy slowly recover, consumers will start feeling the relaxation of the financial situation, it is safe to say, this industry will has a considerable amount of growth in the near future. With Starbuck having the most of market share in the industry, they have a monopolistic competition. By far the biggest threat the company face is the mature stage of the industry. Dunkin donuts, McDonalds, or Peteââ¬â¢s coffee are all the main pressure on Starbucks. Starbucks brand recognition and the convenience of the self-severed machines differentiates itself, the brand and the machine will draw more customersââ¬â¢ attention, gain competitive advantages for the company. The self-served Starbucks coffee machine will be located in some of the most prime and strategic location across the city such as universities, office buildings, and grocery stores. They will primarily targeting mid-income individuals and students. This strategy will gain competence due to the customer convince factor. The Starbuck coffee-pricing factor does pose a weakness to some targeted consumers; however, the self-severed machine will be 5% cheap because there are no labor costs involved. Expansion into a global market is an opportunity for these machines. Starbucks has a great growth potential in further expanding into the emerging and developingà markets. The company can leverage their size, experience, financial prowess and efficiencies to make new market share. (Forbes.com) Starbuck has putting significant amount of time and money on training their employees. Their employees are known for highly knowledge and experienced. They are the main assets of the company and they are provided with great benefits like stock option, retirement accounts and a healthy culture. This effective human capital management translates into great customer services. It was rated 91st in the 100 best places to work for by Fortune Magazine. (CNN.com) The internal threat for Starbucks currently is the change of life style and taste choices of consumers. More and more customers are shifting towards healthy foods and drinks; this treading can hurt the coffee culture of the company, even to industry in the future. The Balanced scorecard is a management system that enables organizations to clarify their vision and strategy and translate them into action. It also provides an organization with feedback of both the internal business processes and external outcomes, which allows for continuous improvement of strategic performance and results. Develop the strategic objectives for the new division of the Starbuck in the balanced scorecard format in the context of key trends, assumptions, and risks. The strategic objectives are measures of attaining the new vision and mission. Below are the three strategic objectives for each of the four balanced scorecard areas identified (Financial, Customer, Process, Learning and Growth). How to gain the market share is the objective in financial perspective. This is aggressive strategy the new division can use to power our organization and weaken the competitors. The new â⬠Self served coffee machineâ⬠can gain market shares by: One: New technology. This market has always been a high growth market, and high growth markets has less competitors, it means they will not fight ourà efforts as fiercely. Two: Innovation. This new machine is absolutely a breakthrough innovative idea once it is release into the market. Innovation can help the new division obtain large market share. Three: Strategic Alliance. The new machine can advertise other products, which is great choice when drinking coffee. If the alliance company can help with founding, we can lower our coffee price. This is efficient way to lure customers from competitors. How do we create value for our customers are the objective for the customer perspective? Customers are the key factor to an organization success. Creating value for our customers in three ways: One: New Value. This is the most challenging way to impress customers. By setting new machines by the office buildings or school parking lots will be most convenience for people do not have time to stop for coffee in the morning, or anytime during the day. Two: More value. The machine will provide the same product as in a Starbucks coffee store, but cheaper. Three: Better Value. To expend on the existing value, the customer will be able to purchase snake from the machine. The addition product provided will simply delivering more powerful impact to consumers. PROCESS OR INTERNAL OPERATIONS PERSPECTIVE How we measure the new division performance? The new division will have its own survey attached to the machine. Customers are the top choice for us to know what does the new division do to make them come back for more. Also, customers can leave feedbacks and advice via Facebook, Yelp, or preferredà social Media. Our new division will make huge impact on the organization, because it will release the busy traffic in the morning for the store location. LEARNING AND GROWTH (EMPLOYEE) PERSPECTIVE There is no employeesââ¬â¢ turn over or retention involved with the ââ¬Å"Self served machineâ⬠However, the mechanics are needed for the daily maintenance and refill. The new technology will notify the mechanic department if the machine needs any attention or checkups. While having a strategic plan, mission and vision Statement is crucial for the new division, but crafting and developing this plan is only the half of the battle. To have a communication plan is one of the most important factors after the plan and analysis is finalized. Although the new division will not have any human operating the machine, there are still the needs of new policies and procedures to be carried out. The effective of these policies and procedures are most likely effect the success of the plan. For example, machines maintenance schedule, or refill of the machine. Failure to take communication plan into account can cause disastrous. Our new business plan is a comprehensive document that outlines key elements of how we going to operate this new division. The plan typically includes an assessment of the market and the competition, operating budget breakdown, and short and long-term business goals. (smallbusiness.chron.com) There are three suggest way to monitor and control our new plan: Any new business plans within an organization needs to be reviewed on a regular basis, especially the expectancy of the busy traffic with the newà self-served machine. The new division management needs to set a date, this can be quarterly or annually, to review the long-term and short-term goals. Conducting the comparative analysis will help to ensure the strategic plan is on the right path. The management team of new division needs to develop a new tracking system to assess how the sales are doing regularly. For example, if the target sales goal is 5000 cups per month, then track the sales weekly or twice a month to monitor and control the process. Monitor key elements frequently. Key elements of the business plan include research on the market and competition as well as revenue projections. Each of these elements is subject to rapid change, and the management team should remain aware of where you stand with regard to these issues. (Smallbusiness.chorn.com) COORDINATE BUSINESS AND MARKING PLANS Our new division will have both business and marketing plans. Sometimes, they overlap in several ways. For example, if the Marketing plans calls for a major launching campaign with the media, but the business planââ¬â¢s revenue prediction rejects that plan, then the managers needs to revise the plan to stay on track. Ethical behaviors and organization social responsibility is one of the key factors to bring large benefits for the business. With the new self-served coffee machine, it attracts customers with Starbucks signature products, thereby to boosting sales and revenue. It will create more jobs, therefor, help with unemployment. It will also attract more investors and keep the companyââ¬â¢s share price high, therefor, protecting the business and employeesââ¬â¢ benefits. The fact is brutally simple: the accelerated change within the business world is unavoidable. Evidence shows in current business world, customers are changing their needs and interest each day, markets are relentlessly unstable, and competitors are more aggressively capture any chance possible at new ideas. With technology advances faster and faster, and modifying the traditional strategic management that it touches, Innovation has become what shapes the current strategic management trends, and the right strategic management is the key to business success. http://www.starbucks.com/about-us/our-heritage Mission and Vision Statements. r Business Plan. We have essays on the following topics that may be of interest to you
Wednesday, August 28, 2019
Personal Development as a Manager and Leader Assignment
Personal Development as a Manager and Leader - Assignment Example Self-development will facilitate employability and enhance the quality of life (Rughani, 2001). Self-development includes formal and informal activities that help an individual perform future roles as a manager or leader. At my individual level, self-development will assist me in improving self-knowledge and building my self-identity (Rughani, 2001). Accordingly, the personal development will enhance my employability as a casual staff manager. The knowledge and skills will assist me in managing casual labour in order to meet the changing requirements of the business enterprise (James, 2003). I will be capable of supervising the staff in the planting, husbandry and dispatch of the organic crops adequately. 1.2 Current abilities and strengths I believe that I am charismatic since I can influence the efforts of my subordinates. I respect other people differences and their contribution towards attainment of a common mission. In addition, I am committed to my self-development and service to other people. I can display creativity and innovation in problem solving and dealing with conflicts within a group. Accordingly, I am capable of implementing change within an organisation since I can adequately assign jobs and ensure that subordinates have the required skills and competencies in meeting the outcomes of their work (Rughani, 2001). However, I need to improve my communication skills so that I can effectively send messages and listen to the needs of my peers in the workplace. I need to learn behavioural aspects of relying messages so that I can be able to demonstrate respect and humility while communication with my subordinates in the workplace. I have self-confidence that will enable me speak out about the tasks and ensure the subordinates focus on attaining their performance goals (Rughani, 2001). The mission of the organisation is to provide the best quality products and services to its clients. The organisation aims at keeping the business profitable, sustainable and ethical in all the business activities. In order to keep the business profitable, I will be required to manage the staff and implement budgets that aim at cutting the costs of operations and increasing the revenues. The company aims at cutting down the costs in order to improve the efficiency of the working processes and maintain highly qualified workforce. In this case, I will aim at meeting this objective through learning new information technology skills that are essential in budgeting and minimising the operational costs in the company. I will also learn budgeting skills that are essential in ensuring the organisational resources are effectively utilized in meeting the objectives of the business. These two set of skills will be essential in managing and directing staff in the organisation (Rughani, 2001). Accordingly, the organisation aims at providing high quality products to the customers. The organisational objective is to attain a competitive edge through providing the best products and services to the customers. In order to effectively accomplish this objective, I will develop my quality circles skills and customer relationship management skills that ensure customer retention and loyalty (Rughani, 2001). I will be capable of identifying all the areas that the organisation can improve quality in the final products and reduce the wastage of the raw materials (Armstrong, 2003). The organisation also aims at sustainability of the operations. In this regard, the objective is to
Tuesday, August 27, 2019
Sociology - Discuss the argument that the family is in decline Essay
Sociology - Discuss the argument that the family is in decline - Essay Example school of thought contests this view and a third argument states that nothing has changed and that the family unit remains largely unchanged (Gillies, 2003). This paper explores the argument that the family is in decline. Firstly, a definition of family will be provided. Secondly, three theoretical perspectives will be presented in regards to the family being in decline. Finally, a conclusion will synthesize the main points raised in this paper, and provide recommendations for future research. Defining what a family is is a highly contentious issue. In 1949 George Murdock defined a family as a group of people that includes two of both sexes, at least tow of who have a legally sanctioned relationship, and one or more children. This view was upheld by functionalist theorists such as Parsons and Goode (Parsons & Bales 1955, Goode 1963 cited in Levy, Widmer, & Kellerhals, 2002). However, over time the variety of families in industrialised societies has increased dramatically, hence its definition has been modified. Macionis and Plummer (2002) define a family as a social institution that can be found to exist in all societies. The function of the institution being to unite people into a cooperative group, to enable survival and raising of children, socialization of children and a regulation of the sexual activity of the people within the group. The family unit being a social group of two or more people who may be related through blood or marriage, or through adoption or by vir tue of cohabitation or family by choice, and so share in the economic and social responsibilities (Macionis & Plummer, 2002). In 21st globalised society numerous forms of family structure exist: the nuclear family remains, with two parents and children, although the term has been extended to include same sex couples who may not be married; the reconstituted family that combines two one-parent families; single-parent families; and the extended family which may be ââ¬Å"verticalâ⬠in that
Monday, August 26, 2019
Why are there relatively few women in top managerial positions and Essay
Why are there relatively few women in top managerial positions and what steps might be taken to overcome the obstacles they face - Essay Example Gender discrimination, bias, sexual harassment, cultural, social and conventional factors all led women not to prefer management career line. This work analyses what measures can be taken in order to bring women in to the management mainstream. People think ââ¬Ëmenââ¬â¢ when they think of ââ¬Ëmanagementââ¬â¢ has been discussed for long by researchers, managements and organizations. Historically, the social attitudes towards ââ¬Ëwomen managementââ¬â¢ had prohibited most women from becoming managers in functional areas of management. The assumption that women are not as better suited for management traits as men had been, until recently, rarely questioned and seldom explored. Even though most perceive that not only men but women are also capable of management traits, why there are few women in management has been a matter of relevant discussion. This work analyses the reasons why there are few women in management positions and what measures need to be taken in order to bring women managers in to the mainstream. Surveys and researches conducted throughout different countries have proved that women in management are fewer disproportionately to the rate of population and education. There continues to be a great disparity in women representation in management when compared to the number of women educated. Women around the world now represent about more than 40% of the total workforce, but their roles in management and leadership remained comparatively low. According to Sanghamitra Buddhapriya (1999), organizational roles have been traditionally gendered. Certain levels and positions have been considered to be more appropriate to women or men. The gendered aspect made men with occupying dominance over women. (p. 3). Those who have reached some higher level managerial positions are constantly being challenged by ever changing working environment. For women managers and leaders, the affirmation and support from a larger community remains still uncommon. Three
Architectural Theory Analytical paper about specific article and Assignment
Architectural Theory Analytical paper about specific article and theory - Assignment Example rence material which Venturi produced is good because it pertains a variety of issues involved when it comes to confronting a term like postmodernism, which constitutes many tangents and a voluminous paper. My focus in the presentation will be on the issue which inspired this project. When analyzing Ducks and Decoration, we see that Robert Venturi believes that there is a prevalent misconception concerning his work. So how did this come about? The concern is, at very least, challenging to layout and attack methodically as it usually is with most things related with the term Postmodern. The complexity is in the fact that the word and what it explains are used in a vast number of ways. People avoided using the term at all in scholarship which was actually most helpful due to its amorphous nature. Its imprecision really doesnt assist with your point if you are scrupulous. The term postmodern means something rather particular when one is talking about architecture. Postmodern, in the most usual parlance when describing an architectural style which means a style on or of a building built in the past 40 years which incorporates references to past non-modern styles, usually the classical. We can site a very common example of what is architecturally and stylistically postmodern; this is the 80s pastel. This is a classical ornament covered Plaza d Italia located in New Orleans which is the work of Michael Graves. This proposal she ds some light on what it we refer to by ducks and decoration, which basically being an architect is working in a postmodern style. Ducks and decoration is on the basis of postmodernism and perhaps it will come out as very surprising and interesting to know that in the September 2001 issue of Architecture magazine, titled postmodernism, Robert Venturi, who is known to be prolific and groundbreaking architect with a legacy assured, among his notable achievements is being the winner of the Pritzker Prize and former professor of architecture at
Sunday, August 25, 2019
Final Assessment of Apple Inc Essay Example | Topics and Well Written Essays - 1250 words
Final Assessment of Apple Inc - Essay Example During critical analysis of its vision and mission statement, examination of Appleââ¬â¢s compliance to business ethics was also performed. Overall outcome of this analysis elaborates that Apple has made innovation and simplicity a foundation of not only its products, but its organizational philosophy as well. Effects of Globalization & Organizational Culture on Employee Selection and Training Apple is an ideal case study for understanding globalization in terms of business model and related processes. With workforce and supply chain scattered all around the globe and access to every part of global mobile and electronic gadgets market, Apple has managed to emerge as a market leader in mobile appliances and related applications. In addition to that, Appleââ¬â¢s organizational culture further supports its global business model and extended market access. ... Globalization has further strengthened the foundation of this culture. As a result of globalized model, Apple has introduced strategies like ethical partnership with the suppliers and home-based jobs for students and other professionals in order to avail opportunities offered by global business model. As far as employee selection is concerned, Apple uses market competitive strategies to attract and retain talent but only recruit employees that are not only job fit but an organization fit as well. As far as training methods employed are concerned, its leadership uses a simple regime of Tell, Show and Do. Employees undergo on-job as well as academic trainings for enhancing their skill inventory and using them accordingly. On the other hand, as an ethical organization, Apple has also introduced educational programs, i.e. graduation, associate and bachelors for employees working for its suppliers. Training its own workforce and suppliersââ¬â¢ employees is influenced by its philosophy that says, ââ¬Å"When people gain new skills and knowledge, they can improve their lives (Apple, 2012a).â⬠Appleââ¬â¢s Vision and Mission Statement Appleââ¬â¢s vision is based on an optimistic ideology of being a market leader in technology and communication devices. It has managed to offer products that cover every aspect of technology usage and allows the consumer to have an impeccable experience with its products becoming an integral part of customerââ¬â¢s life style. Beginning from MacBooks to iPhones and iPads, Apple has attempted to amalgamate convenience, functionality and style in a single gadget. Furthermore, its commitment to have a motivated workforce and supply chain is another area that provides participatory direction to its
Saturday, August 24, 2019
Business event Operation Essay Example | Topics and Well Written Essays - 2500 words
Business event Operation - Essay Example The event seeks to deliver an understanding to the customer segments that the newly-developed vodka emanates from the companyââ¬â¢s devotion that compelled its staff to embark on a two-year research and development to produce the sophisticated wine with a 100% wheat ingredients (Coulter 2010, p. 5). In order to reach the target consumer groups, the observation has been that the Cavendish London hotelââ¬â¢s eco-friendly practices will match the firmââ¬â¢s need to provoke the understanding that the company is indeed devoted into emulating sustainable measures in every aspect that it will relate to during its endeavours. The choice of holding the event at the Cavendish London matches the marketing and consumer attraction needs since the target high-end clientele will perceive the important aspects outlined in the product and conceive the reality of the attributes since the acceptance of the productââ¬â¢s launch at the hotel will emanate from the evaluations undertaken by the venueââ¬â¢s management to identify the products eco-friendly aspects (Van der Aalst, 2008, p. 190). The four star hotel is located at the cityââ¬â¢s commercial centre and its provision of environmentally friendly attributes relate to the newly developed vodkaââ¬â¢s sustainability measures and consumption patterns in the target consumer markets (Corrà 2010, p. 2). The emphases that the venue is an appropriate platform emanate from the provision of large conference rooms that can comfortably accommodate the estimated 100 number of guests. Further, the Cavendish management will provide the required dining and enterta inment room, and following the consultations made, the Big Ben Conferencing room and the immediate rooms will be allocated to suit the eventââ¬â¢s needs. The two parties have agreed to enter into a mutual agreement in hosting the new vodka launching event. The Cavendish London and the Maitre de Chai profess similar sustainable measures despite their
Friday, August 23, 2019
Realism as a Method to Depict Immediacy Unexpectedness and Wonder in Essay
Realism as a Method to Depict Immediacy Unexpectedness and Wonder in Berninis Apollo and Daphne and Poussins Et in Arcadia Ego - Essay Example Itââ¬â¢s that disruption of stasis that I felt the night my ex dropped the ââ¬Å"we need to talkâ⬠line on me. Itââ¬â¢s cliche and immature to dwell on emotional turmoil, yet that night my roommate got an earful of conversations and complaints. Before turning in for the night, he left me with that old as time adage that has passed through nearly every broken heart. ââ¬Å"You canââ¬â¢t understand happiness without feeling pain,â⬠he told me, and as cliche as the phrase is, it is still something I hold to be true. As I studied Apollo and Daphne1 and Et in Arcadia Ego2, I couldnââ¬â¢t help but wonder if Gian Bernini and Nicolas Poussin were attempting to express the same heartache that is so central to this human condition we share. Beyond the longing gaze in Apolloââ¬â¢s eyes and the lamenting stare of the shepherdââ¬â¢s face, what drew me to this question were not the works themselves, but the emotions I felt because of the works. To capture these emotion s, Bernini and Poussin incorporated a novel technique of using realism as a means to achieve the awe-inspiring effect so common to Baroque visual culture. In his 1998 book Italian Baroque Sculpture, Boucher highlights the fact that awe-inspiring effects such as ââ¬Å"immediacy and mimicry, and the unexpected and the surprising were all prized by Baroque artistsâ⬠3. ... It is for this reason that it became one of the most important aims of Italian Baroque sculpture to represent ââ¬Ëflesh as fleshââ¬â¢Ã¢â¬ ¦Ã¢â¬ 4 . While this quote focuses on sculpture, this emphasis on a realistic style was central to all Baroque visual culture. Combining realistic figures with the shocking imagery of a woman turning into a tree or a forgotten tomb in the middle of a field created these desired effects. Because realism is necessary for the effects of immediacy, unexpectedness, and wonder, realism was essential to Baroque visual culture and was skillfully incorporated into the works Apollo and Daphne and Et in Arcadia Ego. The most obvious effect in Berniniââ¬â¢s sculpture is one that is highly associated with Baroque visual culture: immediacy. In his article ââ¬Å"The Element of Motion in Baroque Art and Musicâ⬠, William Flemming describes this increased feeling of immediacy in Baroque culture by saying, ââ¬Å"The Baroque period brought about a q uickening of the pulse of human affairs. It was an age of movement, activity, exploration. Time is of utmost importance. The mechanical clock becomes the dominant symbol of this period and performs the unique function of translating the movements of time into spatial dimensions.â⬠If one is to follow this symbolism to Berniniââ¬â¢s sculpture, then Daphneââ¬â¢s extended arm is minutes away from striking twelve: an obvious symbol of the immediacy felt in the scene. This sculpture is not a still life; this is the peak of action in a moment that will define the lives of these two gods forever. To simply depict this scene with a realistic style would completely miss the specter of a woman turning into a tree, yet to completely focus on the tree would be to ignore the metamorphosis. This is where Berniniââ¬â¢s true genius is
Thursday, August 22, 2019
Has our society become excessively materialistic - SAT essay Essay Example for Free
Has our society become excessively materialistic SAT essay Essay Though it cannot be denied that modern society is profoundly materialistic, there is nothing inherently wrong with a society that values the production and consumption of material goods. Ample historical evidence suggests that societies that devalue capital wealth and material gain will be unstable and short-lived. Materialism ââ¬â whatever value we place upon it ââ¬â creates a stable societal structure. Just turn on the television, peruse the magazine covers in a supermarket, listen to any one of the top forty radio hits and you will be immediately faced with the rampant materialism of modern society. What do we value? Material wealth and celebrity. Why do we worship Paris Hilton, Bill Gates, Jeff Bezos. Steve Jobs? Because they have tremendous buying power and perceived power. What shows do we watch? American Idol, Cribs, Pimp My Ride, My Sweet 16 to name a few. All these shows lift conspicuous consumption and flagrant displays of wealth and hedonism to elevated levels. Our society is very much like the ancient materialistic society of Rome- in which wealth and power were paramount. Thus it cannot be denied that a materialist spirit pervades modern society. But whoââ¬â¢s to say that materialism is wrong? Our philosophers praise the virtues of materialism. Our prophets include the venerable John Smith, Benjamin Franklin, Thomas Keynes and all the myriad materialistic philosophers. And how the anti-materialist philosophers have waned in influence and been discarded to the waste bin of history: Karl Marx, Lenin, Charles Fourrier all have been relegated to the trash heap. Capitalism is the ethos of the day- the driving force of our world. Just ask the Chinese, the Russians, who have discarded their antiquated philosophies in exchange for a more durable, albeit potentially cynical materialism. Materialism acknowledges our innate desire to have more than our neighbors, to do better than the Jones. Because it caters to an inborn human need, materialism will always provide a more stable structure for a society. Modern society is deeply materialistic. Thatââ¬â¢s because materialism works. It validates human needs and desires and works with manââ¬â¢s actual structure rather than the same lofty ideal or fantasy. Let us then celebrate our pervasive materialism and acknowledge its efficacy and virtue. Source: http://www.applerouth.com/blog/2009/06/01/in-praise-of-folly-writing-the-sat-essay/
Wednesday, August 21, 2019
Inventory period and operating cycle Essay Example for Free
Inventory period and operating cycle Essay Age of inventory will show the number of days that inventory of COSCO is being held before they are sold. Increasing or decreasing the same must be a guided by the objective of maintaining a good working capital condition. COSCO Wholesale has inventory period of 27 days. Before recommendation could be made whether its inventory period should be increased, said inventory period must be compared with the payment terms with suppliers. If the companyââ¬â¢s payment terms (Bernstein, 1993) to supplier is 30 days them the age of inventory of 27 days is a good sign that the company is making sale of inventory efficiently, which means that it can sell faster than the next time the company orders and pays for these goods. For COSCO to maintain its 27 days inventory period, it must also tie this up with collection period since higher sales volume is normally associated with longer collection period. Increasing sales on credit with longer collection will decrease inventory period and the two will sum up to operating cycle (Meigs and Meigs, 1995). If the resulting operating cycle still allows a good and manageable working capital situation, then increasing sales on credit must be done up to such point, otherwise mismanaged working could turn the company unable to meet currently maturing obligations. Operating Cycle COSCOââ¬â¢S operating cycle is 30 says which consists of 27 days inventory period and 3 days collection period. To determine whether recommendations should be made whether the cycle could be increased or decreased should be tied up on it working capital situation. If its present working capital situation allows the company to meet it currently maturing obligations then its operating cycle is just right. As discussed earlier, the strategy on operating cycle is affected by decisions made on age of inventory and policy on making sales on credit. One could not just decrease operating cycle without basis like by decreasing age of inventory by underinvestment as this could mean not satisfying the demand for companyââ¬â¢s products for the sake of shorter age of inventory and consequently shorter operating cycle. The companyââ¬â¢s policy on sales on credit must be sufficient enough to meet realistic targets in terms of sales revenues and working capital requirements (Brigham and Houston, 2002).
Tuesday, August 20, 2019
Investigation of Sphincter Muscle Complex
Investigation of Sphincter Muscle Complex Abstract Background: The exact anus reconstruction is the critical in patients with imperforate anusà which is related to the correct diagnosis of sphincter complex. Objectives: The aim of this studyà is exact investigation of the prineal region for ultrasound detection of place and pathway ofà sphincter muscle complex. Patients and Methods: This descriptive cross-sectional study was performed at Mashhadà medical university during 2016. Transperineal sonography was done in ten patients (6-12 weekà age, 8 male and 2 female) with imperforate anus. Results: The shortest distance between rectal pouch and skin was between 8 to 20 mm, but theà distance between rectal pouch and skin via the anal sphincter path was longer (11 to 23 mm). The multi-layer view of anal tubercle was seen in all patients except one. It had a curved andà occasionally parasagittal path and eccentric than muscle complex. Anal muscle sphincterà complex could be seen in all patients with 2- 3.6 mm, occasionally asymmetric. Conclusion: The multi-layer view of anal tubercle and the anal sphincter complex are the twoà important sonographic findings, which can better differentiated the level of anal malformationà and act as an indicator for the location of pull through. Keywords: Anal sphincter muscle complex; Anorectal malformation (ARM); Imperforate anusà (IA); Child 1. Background Colon cancer is a Imperforate anus is one of the anorectal malformations (ARM) which isà characterized with abnormal termination of the hindgut. The anus reconstruction and fecalà continence is one of the critical aspects of treatment and surgery of these patients which isà related to the correct diagnosis of sphincter complex position and the anus reconstruction in theà appropriate place within the sphincter muscle complex . There are various surgical approaches and procedures for anus reconstruction, including the useà of preoperative MRI for diagnosis of type and level of anorectal malformation . In addition, thereà are some articles about the use of MRI in the detection of sphincter complex and the anus pathà guidance . However, later technique has some limitations and no available in all pediatric surgeryà centers. In Imperforate anus (IA) patients, sonography is used to determine the level of disorder (low,à intermediate, high), which may be divided to three groups according to the distance betweenà perineal skin surface and rectal pouch. However, there isnt an exact cut off for theirà differentiation and there is some diagnostic overlap . Some articles consider above 15mm as highà type and below 10 mm as low type ARM , although another numbers between 5- 25 mm are alsoà considered as cut off point in articles. The passage of rectum from levator ani muscle inà transverse view of infra-coccygeal plan is another method that can help in differentiationà between high and low groups. Furthermore, it is also used for diagnosis of internal fistulaà (rectourethral, rectovaginal and etc) which can be helpful in determining level of disorder .à However in practice, these criteria have a little value for operation protocols and the surgicalà planning is mostly according to clinical criteria and intraoperative findings.à The exact localization of anal tubercle and muscle sphincter complex with preoperativeà sonography can help the surgeon to select the less invasive surgical technique and improveà surgical results. 2. Objectives The aims of this study is exact investigation of the prineal region for detection ultrasonic criteriaà of place and pathway of muscle complex and anal sphincter in the children with Imperforateà anus. 3. Patients and Methods This descriptive cross-sectional study was performed at Dr. Sheikh pediatric Hospital duringà 2016 after being approved by the Institutional Review Board of Mashhad University of Medicalà Sciences, Iran and with its grant. In this study, ten patients (6-12 week age) with imperforate anus were selected after obtainingà informed consent from their parents. Nine patients had previous colostomy within the two daysà of life and in another remaining one with rectovestibular fistula didnt previously performed it.à Patients were also evaluated for associated congenital anomalies (VACTERL-H and etc.).à The children were placed in lithotomy position and Foley catheter was passed from distal limb ofà colostomy to the rectum and the balloon was inflated and retracted backward and fixed. Forà better visualization of rectal pouch, normal saline was injected through fixed Foley catheter inà rectum. After prep drape as the first step, transperineal sonography was done by anà experienced pediatric radiologist. Sterile gel and Betadine were used for sonographic window.à The ultrasound devices used in this study was sonosite Model S Nerve with a 12 MHz linearà superficial probe. The sonographic criteria such as shorten distance of rectal pouch from the surface of skin,à distance of rectal pouch from the surface of skin in anal sphincter complex pathway , theà presence of internal fistula, multi-layered view of anal tubercle, state of anal sphincter complexà were evaluated in both sagittal and coronal planes. The Distance between rectal pouch from theà surface of skin in the shortest path and this distance in correlation with sphincter complex wereà separately measured. The distance between the rectal pouch and the surface of the skin and the presence of internalà fistula were evaluated in the sagittal sonographic plane. Internal fistulas can be identified by changing of the rout the echogenic mucus of the rectumà toward urethra or vagina. The multi-layered view of anal tubercle is exactly similar to gut signature, and visualized as aà peripheral hypoechoic layer with two central parallel echogenic lines just below the skinà (dermis). It has vertical position than to anal pit (Fig. 1A) and is visible only in coronal plan.à Anal sphincter complex is noticeable as circular muscular tissue in the depth of the subcutaneousà perineal area and is visible in coronal plan (Fig. 1B). 4. Results Table 1 showed the demographic and sonographic findings of ten imperforate anus patients withà were selected for this study. Eight patients were male and other two were female.à The shortest distance between the rectal pouch and the skin surface was between 8 to 20 mm, butà the distance between the rectal pouch and the surface of skin via the anal sphincter path wasà longer and between 11 to 23 mm, that it was 3- 8 mm. (4.7 mm mean) longer.à There were rectourethral fistula in 7, rectovaginal fistula in 1, rectovestibular fistula in 1, and inà another one patient no fistula was detected. In patient with rectovestibular fistula, anal sphincterà complex was pushed back toward the coccygeal tip due to fecal material pressure.à The multi-layer view of anal tubercle was seen in all patients except one (rectovestibular fistulaà patient). The maximum outside diameter was 3-4 mm, but in patient with cloacal anomaly, it hadà about 10 mm in sagittal plan on the posterior of prineal orifice. In often patients, the analà tubercle path until center of muscle complex had a curved and occasionally parasagittal path andà it wasnt straight (Fig. 1C). The visible length of multi-layer view of anal tubercle was 5-8 mm,à and it attaches to the mucus of muscle complex eccentric or concentric (Fig. 1D).à Anal muscle sphincter complex could be seen in all patients. The muscle complex thickness hadà 2- 3.6 mm which occasionally was asymmetric (Fig. 1E). 5. Discussion Imperforate anus is a congenital disease with abnormal termination of hindgut which have a wideà spectrum of muscle sphincter complex development (from near-normal muscles to completeà absence of the sphincter muscle). Routinely, depending on the level of the obstruction in above,à middle and below of muscle sphincter, this anomaly is categorized into three groups (High,à intermediate, low type) . The numerous factors especially the fecal continence after the surgeryà related to the diagnosis of the exact place of sphincter muscle complex . There are many articles about the role of preoperative MRI in the determining of the type andà level of anorectal malformation which can be helpful in planning and the prediction of theà prognosis and also investigation of the spinal and urethral anomalies which indirectly effect onà the management of disease and operation . MRI has also a role in these patients forà demonstration of the status of sphincter muscle complex, the symmetry of the sphincter, theà perirectal fibrosis . The post-operative MRI is use to evaluate surgical results and the passage ofà pulled-through bowel from the center of sphincter complex . Recently, there are some fewà articles about the use of MRI in the localization of sphincter complex and the anus pathway as aà guidance instrument . The sonography is usually used to determine the level of disorder (low, intermediate, high)à indirectly basis on the distance between perineal skin surface to the rectal pouch and the internalà fistulae visualization. Although, this approach isnt very determinative and there are a lot ofà diagnostic overlap in this field .à In review article, we find only one paper about the detection of the passage of rectum fromà levator ani muscle in transverse view of infra-coccygeal plan that can be helpful forà differentiation of high and low groups . The pre-operative exact localization of anal tubercle and especially sphincter muscle complexà with sonography can be helpful for surgeons to select less invasive approaches that determinesà the future fecal continence of patient. In this study, with exact ultrasound investigation of prineal region, we noticed two sonographicà findings which can be helpful in patients with imperforate anus to determine the proper path ofà anal canal for pull-through operation. These findings were multi-layered view of anal tubercleà and sphincter muscle complex. Multi-layered view of anal tubercle is exactly similar to gut signature and was determined as aà peripheral hypoechoic layer with two central parallel echogenic lines. This view was probablyà the result of fetal anal tubercle as a result non-ruptured anal membrane and non recanalized analà canal. This view wasnt seen in patient with recto-vestibular fistula. Although it had 3-4 mmà diameter, in Cloacal anomaly patient, it had about 10 mm anterior-posterior diameters in sagittalà plan that probably due to fetal merge of anal and vaginal orifices. In most of patients anal tubercle wasnt straight and had parasagittal position and slightlyà curvature with eccentric attachment to center of sphincter muscle complex. These can explainà pathophysiology of disease. Anal sphincter and muscle complex was seen as a circular muscular tissue bulk that surroundsà the echogenic mucus of gastrointestinal tract. It was visible on the coronal plane at depth ofà subcutaneous fat of the perineal area with 2-3.6 mm thickness. This complex was visible in all ofà our 10 patients. In a patient with rectovestibular fistula, this complex pushed backward to the near of coccyxà probably due to fecal retention. Although most patients with Imperforate anus and recto-perinealà fistula categorized as low type, but this patient had high type malformation because the sphincterà complex has been pushed backward and tract of fistula lie above of muscle complex. In thisà patient, based on the distance of rectal pouch to the skin (9 mm) and based on clinical findingsà alone and without attention to muscle sphincter, the probability of successful surgery was tooà low without sonography guide. Then, visualization of the sphincter muscle complex and rectalà pouch is an important sonoghraphic findings in imperforate anus patients that can differentiateà better the patients to the high and low malformation.à In addition, the result of this study shows that the distance between rectal pouch and skin withoutà attention to muscle sphincter is unreliable and can make a serious pitfalls and unawareà complications. In all patients, the distance between rectal pouch and skin through anal tubercleà and muscle complex (11mm) was longer than shorten distance between rectal pouch and skin (3-8 mm mean: 4.7 mm). In lithotomy position, it is important to notice that multi-layered view of anal tubercle and analà sphincter complex was only visible in coronal view and was invisible in routine sagittal andà transverse view, then it may be ignored and didnt notice to it in literatures. In the review ofà articles, we did not encounter a similar publication about the use of this findings in patients withà imperforate anus, although there are many articles about the use of sonography to determine theà anal sphincter complex in adults in various diseases .à This is a preliminary cross sectional study with the low number of patients. In addition, theà frequency of the ultrasonic probe device were our study limitations. Exact examination ofà perineal region with high-frequency probes (14 to 20 MHz) with high amount of the patients canà provide better and more reliable results. Conclusion: The multi-layer view of anal tubercle and the muscular bulk of anal sphincter complex are theà two important sonographic findings, which can better differentiated the level of analà malformation and act as an indicator for the location of anal sphincter pull through in patientsà with Imperforate anus.
Genesis 1-11 :: essays research papers
Genesis 1-11 My mind began to fill with questions and thoughts as I read the first eleven chapters of the Bible (see list of questions after my paper please). It never ceases to amaze me that I can repeatedly read chapters of the Bible and learn or notice something fresh each study session. A number of unique things occurred to me this time through. The fact that the Tigris and Euphrates have actually been on earth since Adam was placed in the Garden of Eden (Genesis 2:14) amazed me. To think that I, with the appropriate finances, could go and see part of the Garden of Eden is astounding. The list of the descendents of Adam (Genesis 5) allowed me to grasp that Noah was only nine generations removed from Adam. I found in one of my reference books that Noahââ¬â¢s father, Lamech, was only fifty-six years old at the time of Adamââ¬â¢s death. However, at the same time, this information was a little disappointing. Did the whole earth really fill with corruption and violence in just nine generations? This served as a definite reminder of the kind of world we are born into. Even so, God sends hope into these Bible passages with Noahââ¬â¢s presence. Noah himself gave me hope. I came to realize as I read that Noah was the first example of a genuinely righteous man in the Bible. With unbending confidence in Godââ¬â¢s word, Noah began to build the Arc. Noah could nearly even be considered an in advance example of what Jesus would be like. For approximately 120 years, Noah preached Godââ¬â¢s judgement, mercy, and the coming flood. However, people turned their heads at Noah and continued in their evil ways. Another interesting event was the first time rain fell from the heavens (Genesis 7:12). Before the great flood, water came up from the ground (Genesis 2:6). After the flood, Noahââ¬â¢s family was the only one on earth. With this data, we can assume that everyone is a descendent of Shem, Ham, or Japheth, Noahââ¬â¢s three sons. Therefore Noahââ¬â¢s family re-populated the earth. Different languages and cultures came when God spread the people all over the earth and confused mankind by separating their languages and geography (Genesis 11:7-9). Genesis 1-11 :: essays research papers Genesis 1-11 My mind began to fill with questions and thoughts as I read the first eleven chapters of the Bible (see list of questions after my paper please). It never ceases to amaze me that I can repeatedly read chapters of the Bible and learn or notice something fresh each study session. A number of unique things occurred to me this time through. The fact that the Tigris and Euphrates have actually been on earth since Adam was placed in the Garden of Eden (Genesis 2:14) amazed me. To think that I, with the appropriate finances, could go and see part of the Garden of Eden is astounding. The list of the descendents of Adam (Genesis 5) allowed me to grasp that Noah was only nine generations removed from Adam. I found in one of my reference books that Noahââ¬â¢s father, Lamech, was only fifty-six years old at the time of Adamââ¬â¢s death. However, at the same time, this information was a little disappointing. Did the whole earth really fill with corruption and violence in just nine generations? This served as a definite reminder of the kind of world we are born into. Even so, God sends hope into these Bible passages with Noahââ¬â¢s presence. Noah himself gave me hope. I came to realize as I read that Noah was the first example of a genuinely righteous man in the Bible. With unbending confidence in Godââ¬â¢s word, Noah began to build the Arc. Noah could nearly even be considered an in advance example of what Jesus would be like. For approximately 120 years, Noah preached Godââ¬â¢s judgement, mercy, and the coming flood. However, people turned their heads at Noah and continued in their evil ways. Another interesting event was the first time rain fell from the heavens (Genesis 7:12). Before the great flood, water came up from the ground (Genesis 2:6). After the flood, Noahââ¬â¢s family was the only one on earth. With this data, we can assume that everyone is a descendent of Shem, Ham, or Japheth, Noahââ¬â¢s three sons. Therefore Noahââ¬â¢s family re-populated the earth. Different languages and cultures came when God spread the people all over the earth and confused mankind by separating their languages and geography (Genesis 11:7-9).
Monday, August 19, 2019
Evening of Bluegrass :: essays research papers
An Evening with the Dickel Brothers It was 9:30 on a chilly Thursday night when our little trio finally found a parking space in the Richmond District. Already drunk, we wove quickly through the neighborhoods by foot. Finally we arrived at the Last Day Saloon, uneasy that we had not purchased tickets in advance for what was sure to be one of the highlights of this years San Francisco Blue Grass and Old Time Festival ââ¬â the fabulous Dickel Brothers. Our fears of a sellout were quickly allayed, as was the sense of unease that having four quarts of Irish whiskey strapped to ones person tends to instill. We were home free, for now, anyway. After purchasing our tickets, we proceeded upstairs to catch the opening act, which, to our delight, turned out to be five perfectly agreeable old geezers calling themselves the Roadoilers. Their sound was pure old-school bluegrass, heavy on melody, light on lyrics. Their artful rendering of the Bill Monroe standard Uncle Penn, made for a memorable encore. Next up, we were subjecte d to the shrill vocal styling of The Stairwell Sisters. Donââ¬â¢t get the wrong idea, I am certain that the particular brand of old-time mountain music that the sisters are peddling is faithfully rendered. The problem for me was simply that the clog-happy cutsieness of their presentation was enough to make even the most dyed in the wool harmony junkie run gasping for the nearest fire exit. And that is exactly what we did. à à à à à We figured the most sensible course of action was to hole up in the alleyway outside the club and wait for the fervent toe tapping to subside. I had barely finished my first cigarette when a lanky figure dressed something akin to Tom Joad on his way to church approached our little assemblage. I recognized him at once as Stephen Dickel, banjo player of the headlining band. ââ¬Å"Anyone know where a fellah can get a bottle of whiskey in this neighborhood?â⬠, he asked plaintively. Jill shrugged, explaining that we were from the East Bay, and thus, had little idea where he might try. Jill, apparently sensing the desperation in his face, thrust a small flask of Bushmills into his hand. After a great deep swallow, he proceeded to explain his sad situation. ââ¬Å"This goddamn hippy club issued only two drink tickets to each of us. How, for the love of Mary, do they expect us to play in this condition?
Sunday, August 18, 2019
Regression Results :: Research Analysis
3.3.4. Results For the purpose of finding a suitable function for benefits transfer, different meta-regression models become specified: (i) different functional forms (e.g., a simple linear form versus semi-log form); (ii) a fully specified model including all independent variables and a restricted model on grounds of statistical significance or econometric problems (e.g., multicollinearity); (iii) robust consistent standard errors to correct for heteroskedasticity. As shown by the test for heteroskedasticity (see Table 3.7), a simple linear form has heteroskedasticity. There are several ways to correct for heteroskedasticity (e.g., GLS, WLS, robust consistent errors, and data transformation). For this study, robust consistent standard errors and data transformation (e.g., the log transformation of the dependent variable) are utilized. All independent variables initially are considered, even if later dropped on grounds of statistical significance or econometric problems (e.g., multicollinearity). Some variables (e.g., MSW and ACTIV) are dropped because the variables have multicollinearity and/or are statistically insignificant at the 20% level for optimizing the meta-regression transfer model (suggested by Rosenberger and Loomis (2001, 2003). A wide range of diagnostic tests has been conducted on each regression for benefits transfer (suggested by Walton et al. 2006). The R^2 for the overall fit of the regression, hypothesis tests (F tests and t tests), and diagnostic works (e.g., skewness-kurtosis normality test, Ramseyââ¬â¢s RESET test for the specification error bias, heteroskedasticity test, and multicollinearity assessment) are reported. The F test assesses the null hypothesis that all or some coefficients ( ) on the modelââ¬â¢s explanatory variables equal zero i.e., ãâ¬â"H_0: à ² ãâ¬â"_1= à ²_2=â⹠¯= à ²_k=0 for all or some coefficients (Wooldridge 2003). A linear restriction test on some coefficients is useful before dropping the variables when some variables are unreliable due to multicollinearity (Hamilton 2004). An important issue when handling small samples is the potential for multicollinearity which has a high degree of linear relationships between explanatory variables (Walton et al. 2006). The high correlation between estimated coefficients on explanatory variables in small samples can produce possible concerns: (i) substantially higher standard errors with lower t statistics (a greater chance of falsely accepting the null hypothesis in standard significance tests); (ii) unexpected changes in coefficient magnitudes or signs; and (iii) statistically insignificant coefficients despite the high R^2 (Hamilton 2004). A number of tests to indicate the presence and severity of multicollinearity exist (e.g., Durbin-Watson tests, VIF, Tolerance, and a correlation matrix between estimated coefficients). One test is the variance inflation factor (VIF) which measures the degree to which the variance and standard error of an estimated coefficient increase because of the inclusion of the explanatory variable (i.
Saturday, August 17, 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
Subscribe to:
Posts (Atom)