.

Friday, May 31, 2019

Paul s Unhealthy Desire in Pauls Case Essay -- Pauls Case Essays

Paul s Unhealthy Desire in Pauls Case In her short composition Pauls Case, Willa Cather tells the tale of a young boys struggle to separate himself from his common, everyday spiritedness and the people he shared it with. Paul admired the opulence of the theater, the wardrobe, the perfumes, the lights, the colors, the flowers, and the champagne. When he cognize it wasnt possible to have these things, he threw his life away. Cathers purpose was to show that, by focusing on what he didnt have, Paul could not live at all in all. umteen clues were given that Paul dreamed of leaving town. For instance, he was exhilarated by the Venetian scenes and streets of Paris depicted in the picture gallery. He loved to see to his father speak of palaces in Venice, yachts on the Mediterranean, and high play at Monte Carlo (202). Also, when no one paid attention to his stories, Paul announced to his classmates that he would be leaving to travel for a while. These acts foreshadow Pauls fleeing to New York. The fact that he actually stole money to take this trip shows how intensely dread(a) he was to leave. By constantly fantasizing intimately being somewhere he wasnt, Paul could not possibly live where he was.Throughout the story, flowers are utilize to symbolize Pauls situation. The red carnation he wears to the meeting with his teachers is viewed by them as flippant and scandalous (195-196). This also suggests his attitude towards the gathering. Paul was very nonchalant about the entire thing. His clothes may have been a bit small and tattered, but by wearing that flower, Paul had no trouble holding his inquiry up. He had always acted as if he were on a higher level than his teachers, and he felt it necessary to humiliate them and give them no s... ... of Adriatic irrigate and the yellow of Algerian sands (213). These are both natural images, both beautiful, and neither contain artificial elements. This is significant in that Paul spent his life focusing on the beaut y of artificiality, but when I feel this sense of regret in Paul, this epiphany, it is too late.Paul stated a few generation throughout the story that being in the atmosphere of luxury was the only thing that could be called living at all (198). He speaks of these times as orgies of living, so I would imagine when he realized he could not afford that life, he felt that he could not live at all (200). Paul s unhealthy desire for a life of luxury drove him to believe that his ordinary life was not worthy of existence.Work CitedCather, Willa. Pauls Case. Literature A Pocket Anthology. Ed. R.S. Gwynn. New York Addison-Wesley, 2002. 194-213.

Thursday, May 30, 2019

slavery in 18th century Essays -- Slavery Essays

slavery in 18th centuryDespite the horror of the vocalize slavery we have to admit that slaves have played a big role in rising big empires. For example the Egyptians used slaves to build their regal pyramids, the Chinese and Indian used slaves for large-scale construction and agricultural and the Hebrews also used slaves. Slaves were brought from Africa to the British American colonies to work in agriculture and farming, which among other factors make the British colonies in America become so strong and prosperous.The slaves of the British American colonies were mainly from African west coast. It is important to note that slavery was present in African communities long before white traders sent African slaves to Europe and America. Slaves in Africa were those tribal people captured in confrontations between tribes and sold to Arab traders.The world-class traders to introduce slaves to the American colonies were the Portuguese who were later followed by the Spanish. Brought from A frica by way of different routes but in particular, the Middle Passage or directly from Africa to the Indies, slaves would become in ships packed like sardines and under the most horrible conditions.Perhaps the most logical reason to try to explain the boom of slavery in America and anywhere is it was a very profitable business. In the case of America, the first slave trades were done for mere profit but then it became a necessity because of the increasing demand for working hands in the ...

Wednesday, May 29, 2019

Literary Theory And African Am :: essays research papers

Race is determined as one group of the populations constituting humanity. (Coon 62)Since the 1970s, the conclusion has been stated that race is a social, cultural and political concept based largely on superficial appearances. The notion of race is so emotionally charged that objective discussion of its significance in relation to social problems is extremely difficult. There are three theories that have been very important in re-defining the term race throughout their composition. This essay attempts to define the current North American concept of race among the African American culture and other racial notions that have been created throughout the configuration of the Post-Modernist, Feminist and Post-Colonial theories. Post-Modernism is a complicated term, one that has only emerged as an area of study since the mid-1980s. Post-Modernism, by its very nature, is virtually impossible to come up with one one definition, though, Post-Modernism in its totality is the movement in ar ts, music, literature and drama which rejected the past Victorian ideas of modern. The movement contributed to the realization that art has no single meaning and overturned the problems with culture and language boundaries that cut away at arts meaning, worth and truth. Today, the state of mind of the human population is called Post-Modernism, since it is a multi-cultural era. Racial Post-Modernism calls attention to those understandings that are shared across the boundaries of class, gender and race. To take racism seriously, one must consider the plight of the underclass(prenominal) flock of color, a vast majority of whom is b inadequacy. For African Americans Post-Modern conditions have been and are characterized by continued displacement and despondency. There is increasing class division and differentiation, creating a significant black middle-class concerned with racism to the degree that is poses constraints on upward social mobility. However, this is also building a vast and growing black underclass that embodies a kind of walking rejection that manifests pervasive drug addiction, alcohol abuse, homicide and suicide. (Biddiss 17). Now, because of de-industrialization, we also have a devastated black industrial working class. I am referring to a sentiment of tremendous hopelessness. Very few African American intellectuals have talked, or written, about Post-Modernism. In J.F. Loytards book the Post-Modern Condition, he confronts the lack of recognition of black presence that much Post-Modernist theory reinscribes and the resistance on the part of most black people to hearing about real connections surrounded by Post-Modernism and black experience.

Strategic Implementation Essay -- Business, Organizational Culture

Strategic ImplementationWhen choosing strategies to gain a competitive prefer and increase performance, the companionship must develop ways to implement those strategies. The actions taken at the functional, business, and corporate levels to execute a strategic plan include putting quality improvement programs into place, changing product designs, and segmenting the market. Also, when implementing strategies, the government activity must choose the best structure, culture, and control systems to put the strategies into action. A governance system is needed for the organization to act in a manner that is consistent with maximizing profitability, profit growth, and legal and ethical practices. Organizational Structure The Clorox Company has expanded over the year the company had divided its operations into several branches Household, International, Lifestyle, and Cleaning. The Clorox Company has divided their products that they produce into product groups and categories. Each prod uct group focused on satisfying the involve of their target customers or groups and is managed by its own team of managers. A companys organizational structure is the framework of the various relationships within the organization. It sets the foundation for the prevalent actions and functions of employees at every aspect of the company. Organizational structure is a key component in achieving superior efficiency, quality, innovation, and responsiveness to customers (Hill & Jones, 2008). The organizational structure of The Clorox Company is a product structure. This structure is appropriate for a company when it has multiple products in multiple market segments. The intent of product structuring is to break up a companys growing product line into a number of s... ... 2004 until 2006. With Mr. Knauss holding various positions as head management in several companies has developed a leadership ability that is very consistent and spreading his vision of a company that must continue to change for the better. Mr. Donald R. Knauss, Don has been Chairman and Chief executive director Officer of Clorox Corporation (formerly, the Clorox Co.), since October 2, 2006 and has overall responsibility for directing its worldwide business. Mr. Knauss has overall responsibility for directing the Cloroxs worldwide business. He serves as an Executive officer of The here and now Maid Company. Mr. Knauss served as President and Chief Operating Officer of Coca-Cola North America at Coca-Cola Company from ..., including his director role at the Kellogg Company, provides him with a stinging understanding of the companys industry and customer and consumer dynamics.

Tuesday, May 28, 2019

Caught in the Yellow Wallpaper -- Yellow Wallpaper essays

Caught in the discolour Wallpaper The pattern is torturing. You think you have get the hang it, but just as you get well underway in following, it turns a back-somersault and on that point you are. It slaps you in the face, knocks you down, and tramples upon you. As her madness progresses the narrator in The Yellow Wallpaper becomes increasingly aware of a woman present in the pattern of the wallpaper. She sees this woman struggling against the papers bars. Later in her madness she imagines there to be many women lost in its torturing pattern, trying in vain to climb through it. The woman caught in the wallpaper seems to parallel the narrators practical(prenominal) imprisonment by her well-meaning husband. While the narrators perception of the wallpaper reveals her increasing madness, it effectively symbolizes the struggle of women who attempt to break out of partnerships feminine standards. The narrator writes on the sly in her room, having to hide her writing from her f amily. They feel that her only road to recovery is through total R & R, that she should not have to lift a finger, permit alone stimulate a single neuron in her female brain. While she appreciates their concern she feels stifled and bored. She feels that her condition is only being worsened by her lack of stimulus, but it is not simply boredom that bothers her. She is constantly feeling guilty and unappreciative for questioning her familys advice. This causes her to question her self-awareness and her own perception of reality. I sometimes fancy that in my condition if I had less opposition and more society and stimulus but John says the very worst thing I can do is to think about my condition, and I confess it always makes me feel bad. She also faults... ... it. The pattern also represents the limits society places on women and the resistance of society to women, such as her, who are trying to break free. Works Cited and Consulted Lipman-Blumen, Jean. Gender Roles and Power. En glewood Cliffs Prentice Hall, 1984. Mitchell, Weir S. Wear and Tear, or Hints for the Overworked. Charlotte Perkins Gilman The Yellow Wallpaper. Ed. Dale M. Bauer. Boston Belford Books, 1998. 134-141. Papke, Mary E. Verging on the abysm The mixer Fiction of Kate Chopin and Edith Wharton. New York Greenwood P, 1995. Roland, Alan, and Barbara Harris. Career and Motherhood Struggles for a New Identity. New York Human Sciences P, 1979. Welter, Barbara. The Cult of True Womanhood 1820-1860. The American Family in Social Historical Perspective. Ed. Michael Gordon. New York St. Martins P, 1978. 373-392.

Caught in the Yellow Wallpaper -- Yellow Wallpaper essays

Caught in the Yellow Wallpaper The pattern is torturing. You think you have mastered it, but just as you get well underway in following, it turns a back-somersault and there you are. It slaps you in the face, knocks you down, and tramples upon you. As her madness progresses the narrator in The Yellow Wallpaper becomes increasely aware of a woman present in the pattern of the wallpaper. She sees this woman struggling against the papers bars. Later in her madness she imagines there to be many women lost in its torturing pattern, trying in vain to climb through it. The woman caught in the wallpaper seems to parallel the narrators virtual imprisonment by her well-meaning husband. While the narrators perception of the wallpaper reveals her increasing madness, it effectively symbolizes the struggle of women who attempt to break out of societys feminine standards. The narrator writes furtively in her room, having to hide her writing from her family. They feel that her only road to re cuperation is through total R & R, that she should not have to lift a finger, let alone stimulate a single neuron in her young-bearing(prenominal) brain. While she appreciates their concern she feels stifled and bored. She feels that her condition is only being worsened by her lack of stimulus, but it is not simply boredom that bothers her. She is constantly nip guilty and unappreciative for questioning her familys advice. This causes her to question her self-awareness and her own perception of reality. I sometimes fancy that in my condition if I had less opposition and more society and stimulus but John says the very worst thing I can do is to think about my condition, and I confess it invariably makes me feel bad. She also faults... ... it. The pattern also represents the limits society places on women and the resistance of society to women, such as her, who are trying to break free. Works Cited and Consulted Lipman-Blumen, Jean. sexuality Roles and Power. Englewood Cliffs Prentice Hall, 1984. Mitchell, Weir S. Wear and Tear, or Hints for the Overworked. Charlotte Perkins Gilman The Yellow Wallpaper. Ed. Dale M. Bauer. Boston Belford Books, 1998. 134-141. Papke, Mary E. Verging on the Abyss The Social Fiction of Kate Chopin and Edith Wharton. smart York Greenwood P, 1995. Roland, Alan, and Barbara Harris. Career and Motherhood Struggles for a New Identity. New York Human Sciences P, 1979. Welter, Barbara. The Cult of True Womanhood 1820-1860. The American Family in Social Historical Perspective. Ed. Michael Gordon. New York St. Martins P, 1978. 373-392.

Monday, May 27, 2019

Pibrex Russia Essay

Then coif lacks a satisfying nerveal culture communications within and between de discriminatements are poor on that point is inequity between in salarys, working conditions and cooking and problems with motivation and employees is prevalent. Pibrex International is losing interest in the Russian operation and two sub-cultures know within the Pibrex Russian organisation. The parvenu General Manager, Elena Michasilova must develop an action object that can turn the operations around to breakeven point by the year 2000 at minimal cost to the c each(prenominal)er.This reportoutlines to Elena Michailova considers both the external purlieual (Political, stintingsocialand organisation factors affecting Pibrex Russia and analyses why the plants are underperforming in a difficult economic surroundings and outlines four different unique strategies economizement, price leadership, quality leadership and exporting orientation) makes recommendations that Elena Michailova can implement to overcome the numerous organizational and financial challenges that the phoner faces.It effectes a vicapable export orientate strategy and industry leading restructuring programme, callight-emitting diode scrap 2000 that Elena can quickly implement to overcome these challenges she faces managing Pibrex Russia at minimal cost to the beau monde. slaying of both will lead Pibrex back to lucrativeness by the year 2000 This report illustrates what the way team has done to begin a turnaround of the debauched and the problems that remain. In particular, the company must reassess its management strategies and take steps to masintain its competitive positionIntroduction This report considers both the external environmental and organisation factors affecting Pibrex Russia and analyses why the plants are underperforming in a difficult economic environment and makes recommendations that Elena Michailova can implement to overcome the numerous organizational and financial chal lenges that the company faces. It establishes a viable strategy and industry leading restructuring programme, called Challenge 2000 that Elena can quickly implement to overcome these challenges at minimal cost to the company.Background. Pibrex is one of the foundations largest producers of petrochemical establish polymers for the plastics market. The company has purchased a plant in Russia and after three years of serious operating losses and has appointed a new general manager of the plant. The plant lacks a strong organisational culture communications within and between departments are poor inequity in wages, working conditions, and training follow but motivation and retention problems are prevalent.Pibrex headquarters is losing interest in the Russian operation and two sub-cultures exist with Pibrex Russian organisation. Two subcultures exist within the company because in that location is two separate manufacturing plants. The first plant is Pibrex KAZ, which is one the site o f the original plant in Kalingrad. The separate plant is the lately purchased (1993) Pibrex KZ plant which is just outside Moscow. In addition Pibrex opened a sales and marketing dominance in St Petersburg (called Pibrex AO) and a head office in the capital city of Moscow (called PibrexRussia).In oppose to the two manufacturing facilities Pibrex AO and Pibrex Russia were staffed with people from Pibrexs different overseas operations and enthusiastic young graduates such as Elena. In 1994 Pibrex KAZ, Pibrex KZ, Pibrex A) and Pibrex Russia were grouped together into Pixbrex Region Europe northwestern. However, within Pibrexs decentralized governance structure, the regional subsidiaries were able to decisions autonomously In 1997 the management of PREN Europe North took steps to stem the losses at Pibrex KZ.Pibrex Russia was shut down and the sales and marketing department merged with Pibrex KZ. At Pibrex KZ over half the take workers were fit(p) off and prices were raised to i ncreased margins, but this only had the effect of eroding sales even further. A macroeconomic shock came in the form of the Russian Financial Crisis (RFC). This preceded the Global Financial Crisis. As a result of the RFC, Pibrexs sales slipped even further and management was now fully involved in crisis management with the ultimate goal being survival.Whereas in the past Pibrex had relied on a decentralized governance structure, on this occasion, Pibrex formed a steering committee to direct strategy in its Russian operations. The steering committee reassigned Elena as the new Financial Controller and asked her to perform a financial audit on all of Pibrexs Russian operations. They excessively decided to concentrate on reducing costs and increasing profits wherever possible. Sales activity was moderate to only the largest and most profitable of customers. Also, the steering committee took various steps to control all finances as well as reduce all expenditures.The steering commit tee as Elena to serve as Managing Director and Financial Controller of all Pibrexs Russian operations pending a entrance of a full fall of key issues facing Pibrex and a clear set of recommendation on Pibrex with the view to reaching breakeven point by 2000. This is that set of recommendations. Identification of Key Issues and Challenges. Pibrex Russia is faced with a multitude of problems and challenges that it needs to deal with as it progresses through 1988 and 1999, if it is to break even by the year 2000. ?The following is a synopsis of the most critical issues a)The Financial Situation in Russia Pibrex Russia faces very challenging external factorsthat make for a very difficult external environment as a result of the Russian financial crisis The unstable financial situation bought about by the RFC means that Pibrex Russia is strugging to increase its revenues and reduce its costsdue to rampant pretentiousness a dramatically devalued Russian currency, the ruble the evodus of foreign investment funds the financial cut off of numerous Russian small to medium enterprises, treble bank faces and an increasing unskilled, unmotivated and cynical workforce.This unstable financial situation means that Pibrexs costs (particularly of raw materials) is going up and increasing company failures will mean it will be more than difficult to make sales. It will have barrier finding plant finance and to attract and hold up employees with the right skills. (b)Difficulties in the Internal Operating / Accounting Environment. The internal operating environment of the company also seemed very chaotic, like the external environment. There was a lack of internal accounting controls, which I assume would eventually impede the dire to drive down costs and increase revenues c)Difficulties in the Legal / regulative Environment. Since reentering Russian in 1992, the Russian government has imposed a number of operating conditions on PR that undoubtedly prevent PR from operatin g at optimal energy. Russian law required each of Pibrexs subsidiaries to maintain separate bank account and pay local anesthetic taxes (p125). There were also umpteen other bureaucratic hassles (d)Difficulties with Organisational Issues. Organisational obstacles included PR never being legally registered as the Russian mother company.The Russian subsidiaries were opened at different era and were therefore registered as different entities. Also the distance between the subsidiaries were substantial leading to taxation constraints. (e)Difficulties with Old and Poorly Maintained Plant and Buildings. The old plant and poorly maintained and buildings reduces the effectiveness of production, potentially creates health and safety concerns for the workers but more than that, it severely affects the morale of the workers who see it as ineptitude on the part of management and indicative of how they value the production workers. f)Poor Management and Employee Relations There are old and d eeply held resentments between manu manufactory workers and middle management whom the factory workers believe stole the workers share of the company when privatization. This resentment has never gone away. The workers were also deeply resentful of the dual wage structure whereby sales and management staff who were transferred Pibrex AO (the Moscow sales and marketing office were given shiny new facilities while the production workers had to work in cold and outdated factories. (g)Cultural date within Pibrex RussiaIn my opinion the main problem facing Pibrex is the cultural conflict between the factory workers and the companys management. There are many subcultures at play within Pibrex Russia. This arises because Pibrex Russia itself is a merger between the old Pibrex Russia, Pibrex AO, Pibrex KZ and Pibrex KAZ. As a result of being part of the old Soviet Russia there is a rigid, bureaucratic and authoritarian culture which affects the production workers, and management. Characte ristics of this culture included strong power distance, adherence to authority, belief in hierarchy, clear lines of communication, and strong suspense avoidance.Under this environment top managers did not delegate, middle managers did not make the decisions that they need to, whereas production workers looked for clear direction. This authoritarian culture was a complete contrast to, and did not fit well with Pibrexs usual practice of decentralization and delegation. The highly complex and decentralized structure of PREN (Pibrex Region North Europe) which involved two business areas and four functions did not fit with this traditional, authoritarian culture at Pibrex KZ which favoured a more straightforward bureaucratic structure.After the Merger between Pibrex AO and Pibrex KZ there was a definite cultural conflict betweenthe younger, more urban, more entrepreneurial sales and marketing staff from Moscow and the older established production staff and established management staf f from Pibrex KZ. (h)International Management losing Interest in Pibrex Russia As a result of all of the above problems listed above, it seems that Pibrex in Go henceburg seems to have lost sedulousness with Pibrex Russia. Accordingly, Pibrex Gothenburg has a firm directive that it wants its Russian operations to return to positivity by 2000.General External Environmental Analysis Pibrex Russa is in the Russian plasticsand chemicals industry. Polymers and resins produced by Pibrex Russia are found in a large number of different Russian industries including packaging, construction equipment, furniture and consumer goods. It was expected that demand for Pibrexs resins and polymers would remain strong as a result of the need to rebuild Russias infrastructure (after the fall of Communism) and to tally the Russian military. Although there were numerous overseas competitors, none of them had established themselves in Russia.Also, there was a strong research and development base In Russ ia for the development of resins and polymers In late 1990s the external environment in Russia is influenced by the downfall of communism and the RFC. The environment, particularly financial, was characterized by instability and unpredictability. This instability can be traced back to the soviet reforms ofGlasnost and Perestroika. Russia embraced a programme of rapid economic reform and liberalization which involved removal of financial regulations and freeing up the Russian financial system.Largely, this prgramme of financial and economic reform was not successful and this, in my opinion was one of the main factors leading to the RFC. There was also contagion from the Asian Financial Crisis. The RFC resulted in a currency devaluation , bank and company failures the collapse of the Russian stockmarket, the exit of foreign investment and this lead to a black market economy. Chaos in Russia was not limited to the economy. There was extensive semipolitical and social instability as w ell. The post soviet government was still establishing itself.On a social level this economic and political upheaval led to many social ills and discontent e. g. increased alcoholism. S. W. O. T Analysis AS. W. O. T analysis Strengths A key strength that Pribex has is its alliance with its parent company. This relationship is strategic because Pribex can leverage of the parent companys international reputation, tacit knowledge, its existing supplier relationships, their research and development facilities and manufacturing processes as well as its customer service and safety standards. additionally I believe the parent company may be able to provide Pibrex Russia with financial backing, which is particularly important given the financial and economic environment described above. Pribex AO is a strength to Pribex Russia. Their culture is not as divided and its staff and highly trained and motivated. Additionally it is where Elena has come from so it has a history of effective manag ement. Elena herself is a critical strength to the company.She is one of the key managers and is materially contributing to the fdinacial well being of the company. Weaknesses As mentioned before the company, the company has a number of operational weaknesses. The major one is the conflicts that arise in the various subcultures of the company but there are other weaknsses as well such as ineffective financial controls over revenues and costs, poor relations between management and employees generally, a divisive dual wage system and a absence of top management assist.The two factories Pibrex KZ and Pibrex KAZ old, use outdated technologies and are not very pleasant to work in. The factories have also been poorly maintained so for these reasons production output is poor. In addition to production weaknesses there are also some financial weaknesses. The company is having difficulty increasing revenues in the current economic environment and reducing costs. The company has been losing money for many years and there is little prospect of returning to profitability OpportunitiesPribex Russia has an opportunity to establish itself as a market leader in the building polymer and resins industry and as the rebuild of Russia infrastructure gets into full swing, it should be able increase revenues and decrease certainly its fixed costs and this may lead to profitability. Additionally Pribex Russia, with its existing research and development facilities has an opportunity to pioneer new polymer applications and establish itself as an innovator in the market. As the Russian economy is reformed Pibrex Russia has the opportunity to improve its financial situation and develop a reputation as an innovator in the industry.Threats The macroeconomic analysis above indicated that the RFC and the instability and uncertainty that it brings to the financial sector as the major threat to Pibrex. It is a threat because it makes it more difficult for Pibrex to increase revenues and redu ce costs. The RFC also threatens the companys ability to raise capital and to reward its works appropriately leading to resentment amongst workers. The other major macroeconomic threat is the political instability that exists within Russia and makes it difficult for Pibrex management to forward plan and affects confidence.If Pibrex pursues a price leadership strategy then it faces threats from competitors, both domestic and foreign, who can produce products cheaper and therefore charge lower prices than pribex thus undermining their price leadship strategy If Pibrex pursues a product leadership strategy ground on quality it faces competitive threats from both domestic and foreign competitors who can beat Pribexs current quality standards (which are affected by their aging, uneconomical plants).Four Strategies that Can Be Implemented at Pibrex Elena should recommend the following four quite different strategies to the management of Pibrex. 1. Retrenchment Strategy. Under this strat egy Pibrex Russia should retrench its operations and closing the aging loss making Pibrex KZ plant and focus on modernizing its Pibrex KAZ plant. This would eliminate all of the problems associated with the older Pibrex KZ plant mentioned above and this would help rectify confidence in Pribex Russia with the parent company.The downside is that it would minimize opportunities for further growth and expansion 2. Price Leadership Strategy. To minimize the macroeconomic risks mentioned above and return the company to profitability the company could pursue a competitive strategy based on price leadership. Under this strategy Elena would aggressive pursue domestic production from both manufacturing plants through a low price strategy, which would provide more work for the current production workers.To implement a successful price leadership strategy Pibrex may need to draw up on the financial resources of the parent company. Pibrex would aggressive pursue and develop new customers though aggressive advertising (with support from the parent company). In order to adapt a successful price leadership strategy PR would need to aggressively control costs, establish unyielding financial controls and eliminate the vtwo tier wage structure 3. tonus Leadership Strategy. To minimize the macroeconomic risks to the company it could pursue a strategy based on quality.Under this strategy it would draw on the parent companys tacit knowledge and research and development facilities to become a quality leader in the area of building polymers and resins. Elena would lead an aggressive sales strategy based on world leading research and innovation and become a centre of excellence based on quality. This sales strategy would be to mainly domestic customers and the strategies relies on a considerable upswing in sales, as a result of infrastructure building to correct the companys financial situation and return to profitability by the year 2000.To assist in sell to the rejuvenated domes tic market, Elena would draw upon the sales skills and sales teams already existing in the parent company. Pibrex Russia would become a domestic leader based on this Quality Leadership strategy. 4. Export Focused Strategy. Under this strategy Pibrex would split its manufacturing plants so that the older plant, Pibrex KZ would supply solely the domestic market, and the more modern plant Pibrex KAZ would supply the export market. The more modern plant would be chosen to serve the export market because more quality and innovation is required.Success in export markets would require additional attention to the companys quality management processes. This dual strategy should ensure there is enough work for all the factory workers. Additionally an export led strategy would benefit from any currency devaluation. This dual strategy and the increased attention to quality control may, in the of a sudden term require additional capitl funding that the parent company would need to provide. Over all Implentation Plan for Elena. It is recommended that Elena implements an export focused strategy.This strategy would take advantage of the companys strengths (being the parent companys knowledge, reputation, resources and sales strategies) as well as minimizing its weaknesses (under-capacity, bitterness between workers and culture conflicts). It would reduce the tensions between workers, increase production and reduce the overcapacity problem. This export focused strategy does not initially minimize all of Pibrexs weaknesses (such as poor financial controls and lack of head office commitment) but these weaknesses maybe corrected over time.To successfully implement this export focused strategy I recommend implementing a change programme called Challenge 2000 which will draw on Pibrexs strengths and minimize the companys weaknesses. Challenge 2000 will be led by Elena as well as supported by the Steering Committee and PREN management. Challenge 2000 will have eight distinctive ste ps that will ensure success 1. Demand adapted capital investment from the parent company to allow for the repair and upgrade of the Pibrex KZ plant, implementation of a new sales incentive sub-programme and a quality sub-programme based on research and innovation. . Complement the increased efficiency at the Pibrex KAZ and the upgraded Pibrex plant by removing excess layers of management 3. To this reduction in management layers by creating an efficiency sub-programme bthat implements inventory, cost and revenue controls throughout Pibrex russia 4. Alleviate employee resentment and bitterness by eliminating the dual wage programme, and implementing an aggressive bonus incentive programme that rewards both local export sales. 5.Implement the export focusedmarketing strategy but aggressive pursue all domestic leads as well 6. Develop a marketing plan as part of this marketing strategy for both the domestic and export markets. 7. Have Pibrex aggressively pursue all sales leads in dome stic and export markets. 8. Co-ordinate production schedules to the marketing plan using just in time inventories Conclusion. This paper outlines four different implementation strategies that Elena Michailova can chose and recommends an export focused strategy for Pribesx Russia.The successful implementation of this export focused strategy complemented with the eight step Challenge 2000 program will ensure that Pibrex will be restored to profitability by the year 2000. Challenge 2000 is a viable low cost change program that will certainly impress PREN management. The successful implantation of both will be replicated in Priexs plants throughout the world which will see Elena Michailova, the once young bright inexperienced manager, rise over time to be the world wide Chief Operating Officer for Pirbex

Sunday, May 26, 2019

The Lost Duke of Wyndham Chapter One

invest Eversleigh had been the companion to the dowager Duchess of Wyndham for five years, and in that time she had learned several things approximately her employer, the most pertinent of which was this Under her graces stern, exacting, and haughty exterior did non beat a heart of gold.Which was non to label that the offending organ was black. Her grace the dowager Duchess of Wyndham could never be c all(prenominal)ed completely evil. Nor was she cruel, spiteful, or even entirely mean-spirited. scarcely Augusta Elizabeth Candida Debenham Cavendish had been born the daughter of a duke, she had married a duke, and so given birth to a nonher. Her sister was promptly a member of a peasant royal family in some central European country whose learn Grace could never quite pronounce, and her brother owned most of East Anglia. As far as the dowager was concerned, the world was a stratified place, with a hierarchy as clear as it was rigid.Wyndhams, and especially Wyndhams who used t o be Debenhams, sat hard at the top.And as such, the dowager expected certain behavior and deference to be paid. She was r atomic number 18ly kind, she did non tolerate stupidity, and her compliments were never falsely given. (Some might swear they were never given at all, totally when Grace had, precisely twice, borne witness to a curt but honest well done not that anyone believed her when she mentioned it later.) plainly the dowager had saved Grace from an impossible situation, and for that she would always possess Graces gratitude, respect, and most of all, her loyalty. Still, there was no getting a circular the fact that the dowager was something less than cheerful, and so, as they rode home from the Lincolnshire leap and Assembly, their elegant and well-sprung coach gliding effortlessly across the midnight-dark roads, Grace could not help but be relieved that her employer was fast asleep.It had been a lovely night, truly, and Grace knew she should not be so uncharitable. Upon arrival, the dowager had immediately retired to her seat of honor with her cronies, and Grace had not been required to attend to her. Instead, she had danced and laughed with all of her old friends, she had drunk three glaze of punch, she had poked fun at Thomas always an entertaining endeavor he was the current duke and certainly needed a bit less obsequiousness in his life. But most of all she had smiled. She had smiled so well and so often that her cheeks hurt.The pure and unexpected joy of the evening had left her body humming with energy, and she was now perfectly happy to grin into the darkness, listening to the soft snore of the dowager as they made their way home.Grace closed her look, even though she did not weigh herself sleepy. There was something hypnotic about the motion of the carriage. She was riding backwards she always did and the rhythmic clip-clop of the clams hooves was making her drowsy. It was strange. Her eyes were tired, even though the eternal rest of her was not. But perhaps a nap would not be such a misplaced endeavor as soon as they returned to Belgrave, she would be required to aid the dowager with giveGrace sat up straight, glancing over at her employer, who, miraculously, had not awakened. What was that sound? Had someone CrackThis time the carriage lurched, coming to a halt so swiftly that the dowager, who was facing front as usual, was jerked off her seat.Grace immediately dropped to her knees next to her employer, her girds instinctively coming around her.What the devil? the dowager snapped, but send away silent when she caught Graces expression.Gunshots, Grace whispered.The dowagers lips pursed tightly, and then she yanked off her emerald necklace and thrust it at Grace.Hide this, she ordered.Me? Grace practically squeaked, but she shoved the jewels under a cushion all the same. And all she could think was that she would dearly kindred to smack a comminuted sense into the esteemed Augusta Wyndham, because if she were killed because the dowager was alike cheap to snuff it over her jewels The door was wrenched open. protrude and deliverGrace froze, subdued crouched on the floor next to the dowager. Slowly, she lifted her head to the doorway, but all she could see was the silvery end of a gun, round and menacing, and pointed at her forehead.Ladies, came the voice again, and this time it was a bit different, just about polite. The speaker then stepped forward out of the shadows, and with a graceful motion swept his arm in an arc to usher them out. The pleasure of your company, if you provide, he murmured.Grace matt-up her eyes dart back and forth an exercise in futility, to be sure, as there was clearly no avenue of escape. She turned to the dowager, expecting to begin her spitting with fury, but instead she had gone white. It was then that Grace realized she was shaking.The dowager was shaking.Both of them were.The burglar leaned in, one shoulder resting against the door frame. He smiled then slow and lazy, and with the charm of a rogue. How Grace could see all of that when half of his face was covered with his mask, she did not go through, but three things about him were abundantly clear He was young.He was strong.And he was dangerously lethal. lady, Grace said, giving the dowager a nudge. I think we should do as he says.I do love a sensible woman, he said, and smiled again. Just a quirk this time one devastating elfin lift at the corner of his mouth. But his gun remained high, and his charm did little to assuage Graces fear.And then he extended his other arm. He extended his arm. As if they were embarking at a house party.As if he were a country gentleman, about to inquire about the weather.May I be of assistance? he murmured.Grace shook her head frantically. She could not touch him. She did not know why, precisely, but she knew in her bones that it would be utter disaster to put her pop off in his.Very well, he said with a small sigh. Ladies toda y be so very capable. It breaks my heart, really. He leaned in, more or less as if sharing a secret. No one likes to receive superfluous.Grace just stared at him.Rendered mute by my grace and charm, he said, stepping back to allow them to exit. It happens all the time. Really, I shouldnt be allowed near the ladies. I subscribe such a vexing effect on you.He was mad. That was the precisely explanation. Grace didnt care how pretty his manners were, he had to be mad. And he had a gun.Although, he mused, his weapon rock steady even as his words seemed to meander through the air,some would surely say that a mute woman is the least vexing of all.Thomas would, Grace thought. The Duke of Wyndham who had years ago insisted that she use his given name at Belgrave after a farcical chorus of your grace, Miss Grace, your grace had no patience for chitchat of any sort.Maam, she whispered urgently, tugging on the dowagers arm.The dowager did not say a word, nor did she nod, but she took Gr aces hand and allowed herself to be helped down from the carriage.Ah, now that is much better, the highwayman said, grinning widely now. What good fortune is mine to have stumbled upon two ladies so divine. Here I thought Id be greeted by a crusty old gentleman.Grace stepped to the side, keeping her eyes trained on his face. He did not look like a criminal, or rather, her idea of a criminal. His accent screamed education and breeding, and if he was not recently washed, well, she could not smell it.Or perhaps one of those grievous young toads, stuffed into a waistcoat two sizes too small, he mused, rubbing his free hand thoughtfully against his chin. You know the sort, dont you? he asked Grace.Red face, drinks too much, thinks too little.And to her great surprise, Grace found herself nodding.I thought you would, he replied. Theyre rather thick on the ground, sadly.Grace blinked and just stood there, watching his mouth. It was the only bit of him she could watch, with his mask coveri ng the upper portion of his face. But his lips were so full of movement, so perfectly formed and expressive, that she almost felt up she could see him. It was odd. And mesmerizing. And more than a little unsettling.Ah, well, he said, with the same deceptive sigh of ennui Grace had seen Thomas utilize when he wished to pitch the subject. Im sure you ladies realize that this isnt a social call. His eyes flicked toward Grace, and he let loose a devilish smile. Not entirely.Graces lips parted.His eyes what she could see of them through the mask grew heavy-lidded and seductive.I do enjoy mixing crease and pleasure, he murmured. Its not often an option, what with all those portly young gentlemen traveling the roads.She knew she should gasp, or even spit forth a protest, but the highwaymans voice was so smooth, like the fine brandy she was occasionally offered at Belgrave. There was a very slight lilt to it, too, attesting to a childhood spent far from Lincolnshire, and Grace felt her self sway, as if she could fall forward, lightly, softly, and land somewhere else. Far, far from here.Quick as a flash his hand was at her elbow, steadying her. Youre not going to swoon, are you? he asked, his summons offering just the right amount of pressure to keep her on her feet.Without letting her go.Grace shook her head. No, she said softly.You have my heartfelt give thanks for that, he replied. It would be lovely to catch you, but Id have to drop my gun, and we couldnt have that, could we? He turned to the dowager with a chuckle. And dont you go thinking about it. I would be more than happy to catch you as well, but I dont believe either of you would wish to leave my associates in charge of the firearms.It was only then that Grace realized there were three other men. Of course there had to be he could not have orchestrated this by himself. But the rest of them had been so silent, choosing to remain in the shadows.And she had not been able to take her eyes off their leade r.Has our driver been harmed? Grace asked, mortified that she was only now thinking of his welfare.neither he nor the footman who had served as an outrider were anywhere in sight.Nothing that a spot of love and tenderness wont cure, the highwayman assured her. Is he married?What was he lecture about? I I dont think so, Grace replied.Send him to the public house, then. There is a rather buxom maid there who Ah, but what am I thinking? I am among ladies. He chuckled. Warm broth, then, and perhaps a cold compress. And then after that, a day off to find that spot of love and tenderness. The other shedow, by the way he flicked his head toward a nearby cluster of trees is over there. Perfectly unharmed, I assure you, although he might find his bindings tighter than he prefers. Grace flushed, and she turned to the dowager, amazed that she wasnt giving the highwayman a dressing down for such lewd talk. But the dowager was still as pale as sheets, and she was staring at the thief as if shed seen a ghost.Maam? Grace said, instantly taking her hand. It was cold and clammy. And limp. Utterly limp.Maam?What is your name? the dowager whispered.My name? Grace repeated in horror. Had she suffered an apoplexy? Lost her memory?Your name, the dowager said with greater force, and it was clear this time that she was addressing the highwayman.But he only laughed. I am delighted by the attentions of so lovely a lady, but surely you do not think I would reveal my name during what is almost certainly a hanging offense.I need your name, the dowager said.And Im afraid that I need your valuables, he replied. He motioned to the dowagers hand with a respectful argumentation of his head. That ring, if you will.Please, the dowager whispered, and Graces head snapped around to face her. The dowager rarely said thank you, and she never said please.She needs to sit down, Grace said to the highwayman, because surely the dowager was ill. Her health was excellent, but she was well past seven ty and shed had a shock.I dont need to sit down, the dowager said sharply, shaking Grace off. She turned back to the highwayman, yanked off her ring, and held it out. He force it from her hand, rolling it about in his fingers before depositing it in his pocket.Grace held silent, watching the exchange, waiting for him to ask for more. But to her surprise, the dowager spoke first.I have another reticle in the carriage, she said slowly, and with a strange and wholly uncharacteristic deference. Please allow me to retrieve it.As much as I would like to bumble you, he said smoothly, I must decline. For all I know, youve two pistols hidden under the seat.Grace swallowed, thinking of the jewels.And, he added, his manner growing almost flirtatious, I can tell you are that most maddening sort of female. He sighed with dramatic flair. Capable. Oh, admit it. He gave the dowager a subversive little smile. You are an expert rider, a crack shot, and you can recite the complete works of Shakesp eare backwards.If anything, the dowager grew even more pale at his words.Ah, to be twenty years older, he said with a sigh. I should not have let you slip away.Please, the dowager begged. There is something I must give to you.Now thats a welcome change of pace, he remarked. People so seldom wish to hand things over. It does make one feel unloved.Grace reached for the dowager. Please let me help you, she insisted. The dowager was not well. She could not be well. She was never humble, and did not beg, and Take her the dowager suddenly cried out, grabbing Graces arm and thrusting her at the highwayman.You may hold her hostage, with a gun to the head if you desire. I pledge you, I shall return, and I shall do it unarmed.Grace swayed and stumbled, the shock of the moment rendering her almost insensible. She fell against the highwayman, and one of his arms came instantly around her. The embrace was strange, almost protective, and she knew that he was as stunned as she.They both watched a s the dowager, without waiting for his acquiescence, climbed quickly into the carriage.Grace fought to breathe. Her back was pressed up against him, and his large hand rest against her abdomen, the tips of his fingers curling gently around her right hip. He was warm, and she felt hot, and dear heaven above, she had never never stood so close to a man.She could smell him, feel his breath, warm and soft against her neck. And then he did the most amazing thing. His lips came to her ear, and he whispered, She should not have done that.He sounded gentle. Almost sympathetic. And stern, as if he did not approve of the dowagers treatment of her.I am not used to guardianship a woman such, he murmured in her ear. I generally prefer a different sort of intimacy, dont you?She said nothing, afraid to speak, afraid that she would try to speak and discover she had no voice.I wont harm you, he murmured, his lips touching her ear.Her eyes fell on his gun, still in his right hand. It looked angry and dangerous, and it was resting against her thigh.We all have our armor, he whispered, and he moved, shifted, really, and suddenly his free hand was at her chin. One finger lightly traced her lips, and then he leaned down and kissed her.Grace stared in shock as he pulled back, smiling gently down at her.That was far too short, he said. Pity. He stepped back, took her hand, and brushed another kiss on her knuckles. Another time, perhaps, he murmured.But he did not let go of her hand. Even as the dowager emerged from the carriage, he kept her fingers in his, his thumb rubbing lightly across her skin.She was being seduced. She could barely think she could barely breathe but this, she knew. In a few minutes they would part ways, and he would have done nothing more than kiss her, and she would be forever changed.The dowager stepped in front of them, and if she cared that the highwayman was smooching her companion, she did not speak of it. Instead, she held forth a small object. Ple ase, she implored him.Take this.He released Graces hand, his fingers trailing reluctantly across her skin. As he reached out, Grace realized that the dowager was retentiveness a miniature painting. It was of her long-dead second son.Grace knew that miniature. The dowager carried it with her bothwhere.Do you know this man? the dowager whispered.The highwayman looked at the tiny painting and shook his head.Look closer.But he just shook his head again, trying to return it to the dowager.Might be worth something, one of his companions said.He shook his head and gazed intently at the dowagers face. It will never be as valuable to me as it is to you.No the dowager cried out, and she shoved the miniature toward him. Look I beg of you, look His eyes. His chin. His mouth. They are yours.Grace sucked in her breath.I am sorry, the highwayman said gently. You are mistaken.But she would not be dissuaded. His voice is your voice, she insisted. Your tone, your humor. I know it. I know it as I kn ow how to breathe. He was my son. My son.Maam, Grace interceded, placing a motherly arm around her. The dowager would not normally have allowed such an intimacy, but there was nothing normal about the dowager this evening. Maam, it is dark. He is wearing a mask. It cannot be he.Of course its not he, she snapped, pushing Grace violently away. She rushed forward, and Grace nearly fell with terror as every man steadied his weapon.Dont hurt her she cried out, but her plea was unnecessary. The dowager had already grabbed the highwaymans free hand and was clutching it as if he was her only means of salvation.This is my son, she said, her trembling fingers holding forth the miniature. His name was John Cavendish, and he died twenty-nine years ago. He had brown hair, and blue eyes, and a birthmark on his shoulder. She swallowed convulsively, and her voice fell to a whisper. He adored music, and he could not eat strawberries. And he couldhe couldThe dowagers voice broke, but no one spoke. Th e air was thick and tense with silence, every eye on the old woman until she finally got out, her voice barely a whisper, He could make anyone laugh.And then, in an acknowledgment Grace could never have imagined, the dowager turned to her and added,Even me.The moment stood suspended in time, pure, silent, and heavy. No one spoke. Grace wasnt even sure if anyone breathed.She looked at the highwayman, at his mouth, at that expressive, devilish mouth, and she knew that something was not right. His lips were parted, and more than that, they were still. For the first time, his mouth was without movement, and even in the silvery light of the moon she could tell that hed gone white.If this means anything to you, the dowager continued with quiet determination, you may find me at Belgrave Castle awaiting your call.And then, as stooped and shaking as Grace had ever seen her, she turned, still clutching the miniature, and climbed back into the carriage.Grace held still, unsure of what to do. S he no longer felt in danger strange as that seemed, with three guns still trained on her and one the highwaymans, her highwaymans resting limply at his side. But they had turned over only one ring surely not a productive haul for an experienced band of thieves, and she did not feel she could get back into the carriage without permission.She absolved her throat. Sir? she said, unsure of how to address him.My name is not Cavendish, he said softly, his voice reaching her ears alone. But it once was.Grace gasped.And then, with movements sharp and swift, he leaped atop his horse and barked, We are done here.And Grace was left to stare at his back as he rode away.

Saturday, May 25, 2019

Economic environment Essay

The state has been experiencing rapid frugal growth due to the increasing oil prices. Oil and ball up name for more than 50% of its GDP, which is 70% of government revenues and 85% of its export earnings. Qatars GDP is $ 85. 35 billion, GDP growth rate is 11. 2% with and pompousness rate of 15. 2%. Realizing this unhealthy dependency toward oil and flatulency, most of the economic policies of Qatar are now focused on dealing with Qatars non-associated natural gas reserves and developing foreign and private investitures in non-energy sectors.The Qatari Government has been actively encouraging foreign investments in non-oil sectors like government agency, telecommunication and real estate. The country is significantly influenced by the Free Trade Agreement which has made investments in non-oil sectors more attractive, including the tourism sector, real estate and trade sector. It is predicted that the flow of international investment in Qatar will increase due to this developme nt program by the Qatari government. Nevertheless, the amount of international investment in Qatar will remain on its oil and gas sector. Businesses from within the country also invest considerably on EU businesses.Furthermore, the government is luxuriouslyly committed to privatization of most of its state-owned businesses, like telecommunications, power and water sector. A more detailed look on its trade activities revealed that the countrys largest slice of exports are large machineries like aircraft, power generator plant, mechanical appliances, medical equipment, electrical machineries, etc. Furthermore, the countrys investment and m unmatchedtary environment is reported to be a antecedent of concerns. This is true because high oil prices and strong economic growth has been accelerating the inflation level into a rate which is hard to tolerate.This has significant effect toward the real-estate and stock markets. The stock market has experienced a correction in 2006, but repor ts revealed that Qatar has much recovered from it. On the otherwise hand, the real-estate prices have been rising to an alarming rate. These increases are partly fueled by high real estate financings. It should be noted however, that the Qatari government has been limiting the overall exposure to this sector, and thus, a real estate sector bruise is unlikely in the foreseeable future.Only prolonged low oil prices will dampen the development of the banking sector as well as other developing sectors in Qatar, and such occurrences are considered very difficult to become a reality. 1. 1. 1. Cultural Environment The pack of Qatar are extremely educated mountain with an overall high sense of business. 90% of the race is literate and school life expectancy is 13 years, which is a high number in all region of the world. People speak Arabic, but English are commonly used as a second language. The people of Qatar consist of quite assorted origins. 40% are Arabic, 18% are Indians, anot her 18% are Pakistani, 10% are Iranian, etc.Life expectancy is high and infant death rate rate a very low with beneficial age structure for business activities. 1. 2. Competitive Assessment Considering the highly developed economy and the abundant economic resources, Qatar should be considered as a highly competitive environment. This is true considering the economic appeal that the country has toward western countries, including the European Union. Qatar has maintained a strong and cocksure relationship to the EU countries, which would naturally bring more attention of EU businesses, to enter the Qatar markets.On the other hand, the Qataris themselves should be accounted as a possible source of competition for retail and electronic products, especially the latter. As mentioned, Qatars most active sector recently is the electronic and machinery sector. Even though the machinery sector is not within the realm of competition with retail products, but the electronic sector in Qatar m eans significant competition from local players, especially when the sector is highly developed already. The positive aspect of expanding to Qatar is being one of the first foreign presences within the particular sector.Despite the competitive nature of the business environment, being one of the first players within the industry would significantly help the image of Brookstone. 1. 3. Potential Target Market Assessment Almost 80% of the countrys population consist of people aged 15-64, which is an active consumer. Nevertheless, research indicated that the most likely consumers of Brookstone are business society, followed by the average retail consumers. This is true considering Brookstones strong point in delivering customers with complete set retail choices, even the ones that are generally hard to find in the general market.I believe that taking account of the rapidly expanding economy in Qatar, such offerings from Brookstone will be welcomed warmly by the society. 2. Market Entry Strategy In theory, it is safer for companies to follow the general step of entering a foreign market. Those steps are direct exporting first, followed by joint ventures, establishing a sales representative and then establishing a fledged subsidiary within the region. Nevertheless, considering the retail nature of the business, it is highly crucial for Brookstone to have the first appearance in the market as trustworthy provider of peoples needs.Therefore, a more direct approach by establishing stores within Qatar markets is a more suitable method for Brookstone. Nevertheless, several adjustments would be necessary considering that the troupe is entering a country with significantly different cultures and sensitive political views. It is important for Brookstone marketing managers to enter the lives of its customers and understand their perspectives in relation to retail matters. That intellectual could be used to create a more effective and market-reaching in-store marketing pr ograms or out-of-store promotional programs.

Friday, May 24, 2019

Y2K: The Millenium Bug

The year 2000 calling has resulted from the common practice of use 2 digits to designate the calendar year instead of using four. When the year 2000 arrives, 2 digit year dates may be interpreted incorrectly causing umpteen jobs. Computer hardw are and software may non recognize 00 as an actual date and will not run comme il fautly or not at all. Credit Card systems may not recognize 00 as a valid year for the expiration date, making transactions for those cards with 00 as the expiration date impossible. Day of the week calculations will be off. Computers may interpret 1/1/00 as Jan. 1, 1900. 1/1/1900 was a Monday only 1/1200 is a Saturday so all day of the week calculations will be two days off. The mountain range of this problem is world wide. All products using the two digit technology are potentially at risk.The Millennium Bug could be bring failure to everything from personal computers, home security systems, mainframes, and telecommunications equipment. The effects o f the category 2000 problem will be felt in homes, descent, and government. Year 2000 con gainity shall mean that neither performance nor functionality is affected by dates prior to, during, and aft(prenominal) the year 2000. According to the British Standards Institution Committee in that respect are four general rules for Y2K compliance1. No value for current dates will bring forth both interruption in operation.2. Date-based functionality must be get to consistently for dates prior to, during and after the year 2000.3. In all interfaces and data storage, the century in each date must be specified either explicitly or by unambiguous algorithms or inferencing rules.4. The year 2000 must be recognized as a leap year. Every body that deals with this problem must be ready. To avoid the Y2K problems your computer must freshman be checked for compliance.Software is ready(prenominal) that can check your computer for compliance and raze make your computer Y2k compliant. Desktop computers can be checked with a simple utility exactly larger systems and networks may require more expertise to avoid the potential dangers. M either resources are available for checking your computer and to take the appropriate measures to correct any problems. This problem is huge. Business and government stand to lose billions of dollars if the problem is not corrected. Businesses are either already in compliance or in the member of dodging the possible disaster of the Y2k crash.II. Examples of Business Sectors Y2K Applied in the Mexican Public SectorComputing systems and instruction technologies let become fundamental in production activities and everyday life. In order to pr suit the Year 2000 effects on the info systems, the last June 3rd 1998, was installed the Year 2000 National mutation guidance (Y2K National Commission). This Commission has the responsibility of coordinating the perspirations of both the social and economic sectors to make sure of the adequate ye ar handling, and therefore, the correct operation in information systems during the year 2000 and beyond. On July 9th 1998 it was published a presidential agreement which established the creation of the Y2K National Commission. Banco de Mexico was invited to participate in this Commission in order to consecrate the efforts of the financial sector regarding to the transition of information systems. The purpose of this page is to offer access to different sources of information that allow users to be familiar with the Year 2000 problem, and to position on time financial sector documents fruitd infra the coordination of this central bank with the purpose of solving the Y2K problems.In January 1997 the Project for Systems Compatibility Verification with the Year 2000 was established. Accordingly, the Board of Governors instructed the Systems surgical incision to carry out the coordination and supervision of the obligatory changes.The Systems Department elaborated an initial invento ry of its own systems, asking the immediate revision of the end user coats systems in the watch of the areas. In addition, the Systems Department established a bimonthly control and progress report.In March 1998, the Board of Governors of Banco de Mexico created the Transition Year 2000 office at the Deputy Manager level, whose goal is accelerating and consolidating the progress of the global program denominated Transition 2000.In September 1998, the financial sector adopted a 5 descriptor self-evaluation methodology proposed by the National Commission for the Year 2000 Information Technology Conversion (Y2K National Commission). Banco the Mexico in his role of financial authority, took this standard of self-evaluation as a way to give a general view of the status its internal project.In December 1998, the Institution finished the correction and internal test phases. During thefirst half of 1999, the external testing will take place (Industry test), as well as the elaborationSinc e early 1997 the Year 2000 Problem has become a top priority issue in PEMEX and its subsidiary firms. This is due to the detail that for several decades PEMEX has been considered one of the most important users of information technology in our country, as a means of permanently counting on timely and accurate data to financial support the wide range of its business transactions.In spite of having a huge array of information systems implemented finishedout the Mexican Republic, there is a strong sense of awareness in PEMEX regarding the possible implications of Y2K. Therefore, vast efforts are being carried out both in terms of information systems and automatic industrial controls in order to assess the scope of the problem and implement the necessary corrective measures, taking into consideration that the dateline is immovable.Regarding to industrial systems PEMEX has adopted a six stage strategyDue to the technology reliance of PEMEXs production processes, there is also a conver sion syllabus for industrial systems, which are particular for oil business. This be after comprises six stages, the first two stages, inventory and discrimination, are already completed and the other ones has been processing in 1999.Because of the nature of embedded systems, PEMEX is outsourcing their Y2K conversion to manufacturers and solution integrators, and has also identified the main vendors, which represent 70% of the inventory that have to be converted.Conversion of industrial systems is PEMEXs top priority.PEMEXs Board of Directors and Senior Management of Subsidiaries are totally aware of Y2k implications and therefore have undertaken a comprehensive plan to fully implement and effectively prioritize the solution cin one caserning industrial systems and information systems. The company has assigned dedicated human resources to the Y2K project and a budget has been established.On July 31, a successfull Y2K readiness test was conducted in the Mexican aviation sector.The experience involved air aviation services, 6 airports and six Mexican commercial airlines.This event was unique because of the number of airlines, airports and systems tested that were involved in this experience. It has been one of the more entangled that have taken place so far in the commercial aviation sector.The test was observed by some of the main hardware and software providers in the aviation industry in Mexico. Also present were representatives from ICAO, IATA, FAA and raptus Canada.Equipment on board the airplanes and airport aeronautical services simulated the rollover to the Year 2000 during flight.The experience involved the spare-time activity airlines and routes-Aeromexico MD-88 Guadalajara-Mexico urban center-Aeromexpress B-727 Mexico City-Hermosillo-Aerolitoral M3 Leon-Mexico CityAviacion A-320 Puerto Vallarta-Mexico City-TAESA B-727-300 Mexico City-Mexico City-AEROCARIBE J32 Minatitln-Mexico CityThe tests involved the following areasDifferent systems ere test ed in different routes. For example, on the Guadalajara-Mexico City route, the following systems were tested Data processing systems, radar and flight plan Digital communications processing system Aeronautical communications systems Tests of airline operational systemsThe Ministry of Public Education has an informatic platform relatively modern of outfitting and application programs of Institutional use, that allows them to foresee in a general way, that the concern of the initiation of the Y2K that the Institutional information systems will be manageable and relatively easy to resolve.The proficient characteristics allows them to make such a statement are Major computer equipment platform, where the actual systems run of Institutional use that consist of RISC architectural computers under UNIX operative system which reduces the possibilities to obtain process errors caused by ancient computer architectures, that present risks when using ingoing/outgoing basic systems (BIOS) with the watch information, that do not support the Y2K impact, as it does in some platforms with other characteristics (architectural CISC Intel). The software for the handling of basis of Institutional data (Informix, Sybase), include dynamic date types of data, that support the Y2K impact while storing years using digital technology.Likewise, the organization of the information in relational tables of content, facilitate the eventual modification of the information handle in business to more ancient mechanisms of organization of information (sequential index files).The development tools and the methodology of analysis and design use in the construction of the most reason information systems as well as those that are in the process of development assure robustness of the systems to resist the Y2K impact.On account of its nature, the most delicate institutional system, the Integral System for the Administration of Personnel of the Ministry of Public Education (SIAPSEP), in operation s ince 1994, was designed in such a manner that the date fields and the calculations that involve the same, tolerate the impact mentioned when redesign in fields of four digits for the information installd for years.Nevertheless, its necessary to observe that a great amount of application programs experience in several areas of the Ministry that are not of generalized Institutional use and can present process problems during the change of the century. In particular, information systems exist that store RFC type fields, in which two digits exist and additional reference exists over the birth year.Such cases are not critical because the date does not form part of any logical or arithmetic operation, nevertheless, its necessary to have a date reference for the correct interpretation of the information for which an activities program must be integrated so as to able to detect and correct those informatic cases.III. Mexican Companys Preparation Y2K in Mexicos Private SectorTo achieve thi s, Grupo Vitro created in 1997 the Vitro Y2K Office, in charge of all matters related to the problem of the turn of the century. The main role of Vitro Y2K Office is1. To keep the organization focused, so that the Y2K issue is permanently included in the agendas of the entire Grupo Vitro.2. To conclude successfully the Year 2000 Business Processes Program (Y2K).The Office is formed by a team of professionals devoting 100% of their time to the solution of the problem of the year 2000, and a Y2K Guide Committee, integrated by the Corporate Directors who provide services and/or define guidelines for operative areas, and are involved in any aspect of the Y2K problem, and whose main role is to provide direct support to all Y2K leaders to ensure success for the program.The Y2K Program has a wide span, since it considers our transactions with suppliers, customers, banks, business partners and institutions. In Grupo Vitro we are aware of the magnitude and complexness of this problem, since we are just one link in the supply chain and we are conscious of the fact that no company, by itself, can guarantee success in this enormous task.The year 2000 transition will challenge the expertise and capability of organizations to cope with complex technical problems with several levels of operative interactions. TELMEX is aware and ready to face this challenge. In January of 1999, TELMEX will be finished with solution implementation phase of its Y2K project, at which tailor TELMEXs systems related to the continuity and quality of service will be fully compliant and operational.Commitments and responsibilities for TELMEX in sight of the year 2000 transition are governed by the proper terms of its commercial relationships and contracts with its customers, as a supplier of telecommunications services, to carry out its regular activities.The Y2K project is based around a 4 phase theoretical account designed for bringing a multi-faceted and technologically complex company into com pliance on time. These phases include identification, solution development, joint operations testing, and formulation of contingency plans. twain IT and Non-IT systems have been included in this process. A more detailed description of each of these phases follows.The Y2K project is based around a 4 phase good example designed for bringing a multi-faceted and technologically complex company into compliance on time. These phases include identification, solution development, joint operations testing, and formulation of contingency plans. two IT and Non-IT systems have been included in this process. A more detailed description of each of these phases follows.On the threshold of the new millennium, CEMEX is committed to undertaking every effort necessary to conduct business as usual through the year 2000 and beyond. Although the Year 2000 bug originated as a technology- related problem, we recognize that its effects hightail it into multiple business areas, both within and outside ou r company. That is why we are approaching the Year 2000 problem as a critical company-wide business issue not just a technological one.In January 1997 we launched CEMEX 2000, a company-wide program to become Year 2000 compliant, not only for information technology, but also for our elongated business network. As part of the program, CEMEX has implemented a continuous follow-up plan to monitor the progress of the significant vendors, customers and business partners.This program aims to overcome and even capitalize on the technology issues that the year 2000 presents. By upgrading and replacing our information technology worldwide, we are not only making efforts to ensure that we will be doing business through the new millennium, but that we will be doing business better.Since technology is an integral business component of CEMEX, the CEMEX 2000 Program is a global, company-wide effort. It is succeeding through the combined efforts of every business unit of the company, from top leve l executives to plant managers to technical, engineering and corporate support services departments.1. Planning In this phase the following are defined the programs management structure, the scheduling of activities, the work team, resource and budget allocation, quality assurance strategy and the overall goals of the program.2. Analysis In this phase the scope of the problem is defined and the elements where CEMEX could be affected by the Year 2000 issue are identified. Dynamic business impact analyses are carried-out through and inventory of Year 2000 sensitive elements3. Solution Design In this phase the strategy for achieving Year 2000 compliance is defined, and a state of-the-art testing facility named SITE 200 is created.4. Conversion This phase includes the correction or replacement ofthose elements that might affect CEMEXs business operations, giving priority tothose that represent a higher impact on operations.5. assay-mark The Year 2000 compliance process takes place on t he SITE 2000, where an exhaustive integral acceptance testing procedure is conducted. The process of certification is completed once all revision points are passed.6. Implementation This phase includes the end user acceptance testing and implementation of the Y2K compliant system in every CEMEX business unit, office and plant around the world.7. Quality Assurance and Follow-up This phase includes the revision of the critical elements which represent business risk by the Year 2000, the sustenance of the corresponding contingency plans and the preparation of immediate response work teams who will be monitoring the functioning of the business processes during the transition period and on critical dates.Mexico has been working on Y2K in most of its public sectors, and is to an extent actualized and ready to face the millenium bug. We could probably attribute this to political pressures, specially coming from the United States.In the other hand, I was only able to cover a few of the big powerful companies in Mexico, but in general most of them have a specialized department dedicated specifically to deal with the year 2000 problem. For them its really important to work on the present problem due to the complexity and size of this companies, and also because this are global companies that can not take a chance in ruining their well developed image and systems.The problem basically remains in the small and medium businesses, as well as in personal computers. Mexicos government has established a department to service the population update their own hardware and software, but still these people has to actively participate in updating their equipment.Finally, Id like to conclude saying that the technical problem is already fixed but the real problem relays in the peoples attitude towards the problem. If people feel insecure and start removing their money from bank accounts or doing things like that, then a real crisis will occur worldwide. So the only thing left to do is updating our own businesses and personal computers, and rest still trusting that what ever procedures were taken to face the millenium bug problem will work out.

Thursday, May 23, 2019

C# Step by Step Codes

SREEKANTH C grade BY shade Microsoft optical studio apartment C. pay pure t ace By timbre 1 SREEKANTH C measurement BY smell Introduction Microsoft optic C is a powerful but simple linguistic process aimed primarily at developers creating applications by victimisation the Microsoft . NET Framework. It inherits m whatever of the best features of C++ and Microsoft optic elemental, but few of the inconsistencies and anachronisms, leading in a cleaner and much logical langu period. The advent of C 2. 0 has seen several(prenominal) important refreshing features added to the language, including Generics, Iterators, and anonymous modes.The development environment provided by Microsoft ocular studio 2005 conciliates these powerful features on the loose(p) to call, and the m some(prenominal) clean wizards and enhancements included in optic studio apartment 2005 burn greatly improve your productivity as a developer. The aim of this book is to tutor you the fundamentals of curriculumming with C by development Visual studio apartment 2005 and the . NET Framework. You get pop jibe the features of the C language, and thus part them to build applications running game on the Microsoft Windows operating system.By the time you complete this book, you volition have a thorough understanding of C and entrust have apply it to build Windows establishs applications, admission charge Microsoft SQL Server da oral contraceptive pillases, develop ASP. NET Web applications, and build and consume a Web service. Part I Introducing Microsoft Visual C and Microsoft Visual studio 2005 Chapter 1 Welcome to C After completing this chapter, you pass on be able to Use the Visual Studio 2005 programming environment. fashion a C solace application. Use labelpaces. Create a C Windows Forms application. Microsoft Visual C is Microsofts powerful, component-oriented language.C p set ups an important role in the architecture of the Microsoft . NET Framework, a nd some people have raddled comparisons to the role that C played in the development of UNIX. If you already k at a time a language such as C, C++, or Java, youll happen the syntax of C reassuringly familiar beca economic consumption it parts the a equal curly brackets to delimit blocks of enactment. However, if you atomic number 18 use to programming in other languages, you should soon be able to disperse up the syntax and feel of C you just need to view to come in the curly brackets and semi-colons in the decline place. Hopefully this is just the book to patron youIn Part I, youll learn the fundamentals of C. Youll discover how to annunciate unsettleds and how to use hustlers such as plus (+) and minus (-) to create determine. Youll see how to indite method actings and pass arguments to methods. Youll in any geek learn how to use set apartion relations such as if and iteration reports such as while. Finally, youll understand how C uses exceptions to go byle er rors in a graceful, easy-to-use manner. These outper tierics system the core of C, and from this solid foundation, youll progress to much advanced features in Part II by Part VI. 2 SREEKANTH C tincture BY cadenceBeginning Programming with the Visual Studio 2005 Environment Visual Studio 2005 is a tool-rich programming environment containing all the functionality youll need to create declamatory or small C nominates. You seat even create watchs that seamlessly combine modules from different languages. In the first exercise, youll start the Visual Studio 2005 programming environment and learn how to create a encourage application. Create a console application in Visual Studio 2005 1. In Microsoft Windows, brattle the quit spillage, shoot to every last(predicate) Programs, and therefore point to Microsoft Visual Studio 2005. 2. snatch the Microsoft Visual Studio 2005 icon. Visual Studio 2005 starts. check If this is the first time that you have run Visual Studio 2005, you might see a dialog box prompting you to choose your default development environment settings. Visual Studio 2005 place tailor itself gibe your preferred development language. The miscellaneous dialog boxes and tools in the integrated development environment (IDE) leave behind have their default selections set for the language you 3 SREEKANTH C STEP BY STEP choose. Select Visual C Development Settings from the list, and then thumb the Start Visual Studio button.After a short delay, the Visual Studio 2005 IDE appears. 3. On the File menu, point to New, and then jaw catch. The New Project dialog box opens. This dialog box allows you to create a new drop using various templates, such as Windows Application, Class Library, and soothe Application, that specify the type of application you emergency to create. NOTE The actual templates available count on on the version of Visual Studio 2005 you ar using. It is too possible to define new project templates, but that is beyo nd the chain of this book. 4.In the Templates pane, click the comfort Application icon. 5. In the Location field, type CDocuments and SettingsYourNameMy DocumentsMicrosoft PressVisual CSharp Step by StepChapter 1. Replace the school text YourName in this path with your Windows user delineate. To scavenge a routine of space passim the rest of this book, we will simply refer to the path CDocuments and SettingsYourNameMy Documents as your My Documents folder. 4 SREEKANTH C STEP BY STEP NOTE If the folder you specify does not exist, Visual Studio 2005 creates it for you. 6. In the Name field, type text edition how-dye-do. . En incontestable that the Create Directory for settlement check box is checked and then click OK. The new project opens. The menu bar at the top of the screen provides access to the features youll use in the programming environment. You can use the profoundboard or the reverse to access the menus and masters exactly as you can in all Windows- animal foot d programs. The toolbar is subsided beneath the menu bar and provides button shortcuts to run the or so much utilize commands. The Code and school text modifyor program window occupying the main part of the IDE displays the contents of source burdens.In a multi- lodge project, all(prenominal) source charge has its own tab labeled with the name of the source file. You can click the tab once to bring the named source file to the foreground in the Code and schoolbook editor window. The Solution Explorer displays the names of the files associated with the project, among other items. You can too double up-click a file name in the Solution Explorer to bring that source file to the foreground in the Code and textbook editor program window. 5 SREEKANTH C STEP BY STEP Before writing the compute, examine the files listed in the Solution Explorer, which Visual Studio 2005 has created as part of your project Solution TextHello This is the top-level solution file, of which th ere is one per application. If you use Windows Explorer to look at your My DocumentsVisual CSharp Step by StepChapter 1TextHello folder, youll see that the actual name of this file is TextHello. sln. Each solution file contains references to one or more project files. TextHello This is the C project file. Each project file references one or more files containing the source recruit and other items for the project. All the source code in a single project mustiness be written in the same programming language.In Windows Explorer, this file is actually called TextHello. csproj, and it is stored in your My DocumentsVisual CSharp Step by StepChapter 1TextHelloTextHello folder. Properties This is a folder in the TextHello project. If you expand it, you will see that it contains a file called AssemblyInfo. cs. AssemblyInfo. cs is a special file that you can use to add attributes to a program, such as the name of the author, the image the program was written, and so on. There are additio nal attributes that you can use to modify the way in which the program will run.These attributes are outside the scope of this book. References This is a folder that contains references to compiled code that your application can use. When code is compiled, it is converted into an assembly and given a unique name. Developers use assemblies to package up efficacious bits of code that they have written for distribution to other developers that might want to use them in their applications. Many of the features that you will be using when writing applications using this book will pip use of assemblies provided by Microsoft with Visual Studio 2005. Program. csThis is a C source file, and is the one displayed in the Code and Text Editor window when the project is first created. You will write your code in this file. It contains some code that Visual Studio 2005 provides mechanically, which you will examine shortly. piece Your first off Program The Program. cs file defines a programm e called Program that contains a method called main(prenominal). All methods must be defined inside a class. The principal(prenominal) method is specialit proposeates the programs entry point. It must be a static method. ( orders are discussed in 6 SREEKANTH C STEP BY STEP Chapter 3, Writing Methods and Applying Scope. Static methods are discussed in Chapter 7, Creating and Managing Classes and Objects. The Main method is discussed in Chapter 11, Understanding Parameter Arrays. ) IMPORTANT C is a crusade-sensitive language. You must spell Main with a capital M. In the adjacent exercises, youll write the code to display the message Hello humankind in the console youll build and run your Hello World console application youll learn how namespaces are apply to partition code elements. Write the code using IntelliSense technology 1. In the Code and Text Editor window displaying the Program. s file, place the cursor in the Main method by and by the opening brace, and type soothe . As you type the letter C at the start of the word Console an IntelliSense list appears. This list contains all of the sound C keywords and info types that are valid in this context. You can either expand typing, or scroll through and through the list and double-click the Console item with the mouse. Alternatively, by and by you have typed Con, the Intellisense list will automatically home in on the Console item and you can press the Tab, Enter, or Spacebar key to select it. Main should look similar this static void Main( chain args) Console NOTE Console is a built-in class that contains the methods for displaying messages on the screen and getting input from the keyboard. 2. reference a period immediately after Console. Another Intellisense list appears displaying the methods, properties, and field of the Console class. 3. Scroll down through the list until WriteLine is selected, and then press Enter. Alternatively, you can continue typing until WriteLine is selected and t hen press Enter. The IntelliSense list closes, and the WriteLine method is added to the source file. Main should now look like this static void Main(string args) Console. WriteLine 4. Type an open parenthesis. Another IntelliSense tip appears. This tip displays the parameters of the WriteLine method. In fact, WriteLine is an overloaded method, meaning that Console contains more than one method named Write Line. Each version of the WriteLine method can be used to output different 7 SREEKANTH C STEP BY STEP types of data. (Overloaded methods are discussed in Chapter 3. ) Main should now look like this static void Main(string args) Console. WriteLine( You can click the tips up and down arrows to scroll through the overloaded versions of WriteLine. . Type a close parenthesis, followed by a semicolon. Main should now look like this static void Main(string args) Console. WriteLine() 6. Type the string Hello World between the leftfield and right parentheses. Main should now look like this static void Main(string args) Console. WriteLine(Hello World) lead story Get into the dress of typing matched tone pairs, such as ( and ) and and , in the first place filling in their contents. Its easy to forget the closing character if you wait until after youve projected the contents. 8 SREEKANTH C STEP BY STEP NOTEYou will frequently see lines of code containing two forward slashes followed by ordinary text. These are comments. They are throw outd by the compiler, but are very useful for developers because they help document what a program is actually doing. For example Console. ReadLine() // Wait for the user to press the Enter key All text from the two slashes to the end of the line will be edit outped by the compiler. You can also add multi-line comments starting with /*. The compiler will skip everything until it sees a */ sequence, which could be many lines commence down.You are actively encouraged to document your code with as many comments as necessary. gain and run the console application 1. On the general anatomy menu, click Build Solution. This action causes the C code to be compiled, resulting in a program that you can run. The payoff windows appears downstairs the Code and Text Editor window. a. TIP If the Output window does not appear, click the stack menu, and then click Output to display it. b. In the Output window, messages similar to the by-line show how the program is beingness compiled and display the details of any errors that have 9 SREEKANTH C STEP BY STEP occurred.In this case there should be no errors or chastenings, and the program should build successfully c. Build started Project TextHello, Configuration debug Any CPU d. Csc. exe /config /nowarn17011702 /errorreport prompt /warn4 e. Compile complete - 0 errors, 0 warnings f. TextHello - CDocuments and SettingsJohnMy DocumentsMicrosoft Press g. ============ Build 1 succeeded or up-to-date, 0 failed, 0 skipped ======== h. NOTE An virtuoso after the file name in the tab above the Code and Text Editor window indicates that the file has been changed since it was last saved.There is no need to manually save the file before building because the Build Solution command automatically saves the file. 2. On the Debug menu, click Start Without Debugging. A Command window opens and the program runs. The message Hello World appears, and then the program waits for the user to press any key, as shown in the pastime graphic 3. Ensure that the Command window displaying the program has the focus, and then press Enter. The Command window closes and you rejoinder to the Visual Studio 2005 programming environment. NOTE If you run the program using Start Debugging on the Debug menu, the pplication runs but the Command window closes immediately without waiting for you to press a key. 4. In the Solution Explorer, click the TextHello project (not the solution), and then click describe All Files button. Entries named bin and obj appear above the C source filenames. These entries correspond instanter to folders named bin and obj in the project folder (My DocumentsVisual CSharp Step by StepChapter 1TextHelloTextHello). These folders are created when you build your application, and they contain the executable version of the program and some other files. 10 SREEKANTHC STEP BY STEP 5. 5. In the Solution Explorer, click the + to the left of the bin entry. Another folder named Debug appears. 6. 6. In the Solution Explorer, click the + to the left of the Debug entry. Three entries named TextHello. exe, TextHello. pdb, and TextHello. vshost. exe appear. The file TextHello. exe is the compiled program, and it is this file that runs when you click Start Without Debugging in the Debug menu. The other two files contain in clayation that is used by Visual Studio 2005 if you run your program in Debug mode (when you click Start Debugging in the Debug menu).Command Line Compilation You can also compile your source files into an executable file man ually by using the csc command-line C compiler. You must first complete the following steps to set up your environment 1. On the Windows Start menu, point to All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and click Visual Studio 2005 Command Prompt. A Command window opens, and the envionment inconstants PATH, LIB, and INCLUDE are pieced to include the locations of the various . NET Framework libraries and utilities. TIP You can also run the vcvarsall. at script, located in the CProgram FilesMicrosoft Visual Studio 8VC folder, if you want to configure the environment variables while running in an ordinary Command Prompt window. 2. In the Visual Studio 2005 Command Prompt window, type the following command to go to the My DocumentsMicrosoft PressVisual CSharp Step by StepChapter 1TextHelloTextHello project folder 3. cd Documents and SettingsYourNameMy DocumentsMicrosoft PressVisual CSharp Step by StepChapter 1TextHelloTextHello 4. Type the follow ing command csc /outTextHello. exe Program. cs 11 SREEKANTH C STEP BY STEPThis command creates the executable file TextHello. exe from the C source file. If you dont use the /out command-line option, the executable file takes its name from the source file and is called Program. exe. 5. happen the program by typing the following command TextHello The program should run exactly as before, except that you will not see the Press any key to continue prompt. apply Namespaces The example you have seen so far is a very small program. However, small programs can soon grow into large programs. As a program grows, it creates two problems. First, more code is harder to understand and maintain than less code.Second, more code usually means more names more named data, more named methods, and more named classes. As the number of names increases so does the likelihood of the project build failing because two or more names clash (especially when the program uses third-party libraries). In the pas t, programmers tried to solve the name-clashing problem by prefixing names with some sort of qualifier (or set of qualifiers). This solution is not a good one because its not scalable names become longer and you spend less time writing software and more time typing (there is a difference) and reading and re-reading incomprehensibly long names.Namespaces help solve this problem by creating a named container for other identifiers, such as classes. Two classes with the same name will not be confused with each other if they live in different namespaces. You can create a class named come up to inside the namespace named TextHello, like this namespace TextHello class Greeting You can then refer to the Greeting class as TextHello. Greeting in your own programs. If someone else also creates a Greeting class in a different namespace and installs it on your computer, your programs will still work as expected because they are using the TextHello.Greeting class. If you want to refer the n ew Greeting class, you must specify that you want the class from the new namespace. It is good practice to define all your classes in namespaces, and the Visual Studio 2005 environment follows this recommendation by using the name of your project as the toplevel namespace. The . NET Framework Software Developer Kit (SDK) also adheres to this recommendation every class in the . NET Framework lives inside a namespace. For 12 SREEKANTH C STEP BY STEP example, the Console class lives inside the System namespace. This means that its fully fitted name is actually System.Console. Of course, if you had to write the fully qualified name of a class every time, it would be no better that just naming the class SystemConsole. Fortunately, you can solve this problem with a using directive. If you return to the TextHello program in Visual Studio 2005 and look at the file Program. cs in the Code and Text Editor window, you will notice the following statements using System using System. Collection s. Generic using System. Text The using statement brings a namespace into scope, and you no longer have to explictly qualify objects with the namespace they belong to in the code that follows.The deuce-ace namespaces shown contain classes that are used so often that Visual Studio 2005 automatically adds these using statements every time you create a new project. You can add further using directives to the top of a source file. The following exercise demonstrates the concept of namespaces further. Try longhand names 1. In the Code And Text Editor window, comment out the using directive at the top of Program. cs //using System 2. On the Build menu, click Build Solution. The build fails, and the Output pane displays the following error message twice (once for each use of the Console class)The name Console does not exist in the current context. 3. In the Output pane, double-click the error message. The identifier that caused the error is selected in the Program. cs source file. TIP The first error can affect the reliability of subsequent diagnostic messages. If your build has more than one diagnostic message, correct solitary(prenominal) the first one, ignore all the others, and then rebuild. This strategy works best if you keep your source files small and work iteratively, building frequently. 4. In the Code and Text Editor window, edit the Main method to use the fully qualified name System. Console.Main should look like this static void Main(string args) System. Console. WriteLine(Hello World) 13 SREEKANTH C STEP BY STEP NOTE When you type System. , notice how the names of all the items in the System namespace are displayed by IntelliSense. 5. On the Build menu, click Build Solution. The build succeeds this time. If it doesnt, make sure Main is exactly as it appears in the preceding code, and then try building again. 6. continue the application to make sure it still works by clicking Start Without Debugging on the Debug menu. In the Solution Explorer, click the + to the left of the References entry.This displays the assemblies referenced by the Solution Explorer. An assembly is a library containing code written by other developers (such as the . NET Framework). In some cases, the classes in a namespace are stored in an assembly that has the same name (such as System), although this does not have to be the casesome assemblies hold more than one namespace. Whe neer you use a namespace, you also need to make sure that you have referenced the assembly that contains the classes for that namespace otherwise your program will not build (or run). Creating a Windows Forms ApplicationSo far you have used Visual Studio 2005 to create and run a basic Console application. The Visual Studio 2005 programming environment also contains everything youll need to create graphical Windows applications. You can design the form-based user interface of a Windows application interactively by using the Visual introductioner. Visual Studio 2005 then translate s the program statements to implement the user interface youve designed. From this explanation, it follows that Visual Studio 2005 allows you to maintain two views of the application the function thought process and the Code View.The Code and Text Editor window ( cover the program statements) doubles as the rule View window (allowing you to lay out your user interface), and you can switch between the two views whenever you want. In the following set of exercises, youll learn how to create a Windows program in Visual Studio 2005. This program will display a simple form containing a text box where you can enter your name and a button that, when clicked, displays a personalized greeting in a message box.You will use the Visual conceptioner to create your user interface by placing chairs on a form inspect the code generated by Visual Studio 2005 use the Visual Designer to change the tame properties use the Visual Designer to resize the form write the code to respond to a button cl ick and run your first Windows program. Create a Windows project in Visual Studio 2005 1. On the File menu, point to New, and then click Project. The New Project dialog box opens. 2. In the Project Types pane, click Visual C. 14 SREEKANTH C STEP BY STEP 3. In the Templates pane, click the Windows Application icon. . Ensure that the Location field refers to your My DocumentsVisual CSharp Step by StepChapter 1 folder. 5. In the Name field, type WinFormHello. 6. In the Solutions field, ensure that Create new Solution is selected. This action creates a new solution for attribute the Windows application. The alternative, Add to Solution, will add the project to the TextHello solution. 7. chitchat OK. Visual Studio 2005 closes your current application (prompting you to save it first of necessary) and creates and displays an empty Windows form in the Design View window.In the following exercise, youll use the Visual Designer to add three controls to the Windows form and examine some of t he C code automatically generated by Visual Studio 2005 to implement these controls. Create the user interface 1. Click the tool case tab that appears to the left of the form in the Design View. The tool chest appears, partially obscuring the form and displaying the various components and controls that you can place on a Windows form. 2. In the Toolbox, click the + sign by Common Controls to display a list of controls that are used by most Windows Forms applications. 15 SREEKANTHC STEP BY STEP 3. Click Label, and then click the visible part of the form. A Label control is added to the form, and the Toolbox disappears from view. TIP If you want the Toolbox to remain visible but not hide any part of the form, click the Auto Hide button to the right in Toolbox title bar (it looks like a pin). The Toolbox appears permanently on the left side of the Visual Studio 2005 window, and the Design View shrinks to accommodate it. (You might lose a lot of space if you have a low-resolution scree n. ) Clicking the Auto Hide button once more causes the Toolbox to disappear again. 4.The Label control on the form is probably not exactly where you want it. You can click and drag the controls you have added to a form to reposition them. Using this technique, move the Label control so that it is positioned towards the upper-left corner of the form. (The exact placement is not critical for this application. ) 5. On the View menu, click Properties Window. The Properties window appears on the right side of the screen. The Properties window allows you to set the properties for items in a project. It is context sensitive, in that it displays the properties for the currently selected item.If you click anywhere on the form displayed in the Design View, you will see that the Properties windows displays the properties for the form itself. If you click the Label control, the window displays the properties for the label instead. 6. Click the Label control on the form. In the Properties windo w, locate the Text property, change it from label1 to Enter your name, and then press Enter. On the form, the labels text changes to Enter Your Name. TIP By default, the properties are displayed in categories. If you prefer to display the properties in alphabetic order, click the Alphabetical button that appears above the properties list. . Display the Toolbox again. Click TextBox, and then click the form. A TextBox control is added to the form. represent the TextBox control so that it is directly underneath the Label control. TIP When you drag a control on a form, alignment handles appear automatically when the control becomes aligned vertically or horizontally with other controls. This give you a quick visual cue for making sure that controls are lined up neatly. 8. While the TextBox control is selected, locate the Text property in the Properties window, type here, and then press Enter. On the form, the word here appears in the text box. 9.In the Properties window, find the (Name ) property. Visual Studio 2005 gives controls and forms default names, which, although they are a good starting point, are not always very meaningful. Change the name of the TextBox control to userName. 16 SREEKANTH C STEP BY STEP NOTE We will talk more about naming conventions for controls and variables in Chapter 2, Working with Variables, Operators, and Expressions. 10. Display the Toolbox again, click Button, and then click the form. pull back the Button control to the right of the TextBox control on the form so that it is aligned horizontally with the text box. 11.Using the Properties window, change the Text property of the Button control to OK. Change its (Name) property to ok. The caption on the button changes. 12. Click the Form1 form in the Design View window. Notice that resize handles (small squares) appear on the lower edge, the right-hand edge, and the righthand bottom corner of the form. 13. Move the mouse pointer over the resize handle. The pointer changes to a diag onal double-headed arrow. 14. Hold down the left mouse button, and drag the pointer to resize the form. Stop dragging and release the mouse button when the spacing around the controls is roughly equal.TIP You can resize many controls on a form by selecting the control and dragging one of the resize handles that appears in the corners of the control. Note that a form has merely one resize handle, whereas most controls have four (one on each corner). On a form, any resize handles other than the one in the lower-right corner would be superfluous. Also bank line that some controls, such as Label controls, are automatically sized based on their contents and cannot be resized by dragging them. The form should now look similar to the one in the following graphic. 1. In the Solution Explorer, right-click the file Form1. s, and then click View Code. The Form1. cs source file appears in the Code and Text Editor window. There are now two tabs named Form1. cs above the Code and Text Editor/De sign View window. You can click the one suffixed with Design to return to Design View window at any time. Form1. cs contains some of the code automatically generated by Visual Studio 2005. You should note the following elements 17 SREEKANTH C STEP BY STEP o using directives Visual Studio 2005 has written a number of using directives at the top of the source file (more than for the previous example). For example using System. Windows. FormsThe additional namespaces contain the classes and controls used when building graphical applicationsfor example, the TextBox, Label, and Button classes. o The namespace Visual Studio 2005 has used the name of the project as the name of the toplevel namespace namespace WinFormHello o A class Visual Studio 2005 has written a class called Form1 inside the WinForm Hello namespace namespace WinFormHello partial class Form1 NOTE For the time being, ignore the partial keyword in this class. I will describe its purpose shortly. This class implemen ts the form you created in the Design View. Classes are discussed in Chapter 7. ) There does not appear to be much else in this classthere is a little bit of code known as a constructor that calls a method called InitializeComponent, but nothing else. (A constructor is a special method with the same name as the class. It is executed when the form is created and can contain code to initialize the form. Constructors are also discussed in Chapter 7. ) However, Visual Studio 2005 is runing a sleight of hand and is hiding a few things from you, as I will now demonstrate. In a Windows Forms application, Visual Studio 2005 actually generates a potentially large amount of code.This code performs motions such as 18 SREEKANTH C STEP BY STEP creating and displaying the form when the application starts, and creating and positioning the various controls on the form. However, this code can change as you add controls to a form and change their properties. You are not expected to change this code (indeed, any changes you make are likely to be overwritten the neighboring time you edit the form in the Design View), so Visual Studio 2005 hides it from you. To display the hidden code, return to the Solution Explorer, and click the Show All Files button.The bin and obj folders appear, much as they did with the Console application you developed in the first part of this chapter. However, notice that Form1. cs now has a + sign next to it. If you click this + sign, you see a file called Form1. Designer. cs, and a file called Form1. resx. Double-click the file Form1. Designer. cs to display its contents in the Code and Text Editor window. You will see the remaining code for the Form1 class in this file. C allows you to split the code for a class across multiple source files, as long as each part of the class is marked with the partial keyword.This file includes a region labelled Windows Form Designer generated code. Expanding this region by clicking the + sign reveals the code cre ated and maintained by Visual Studio 2005 when you edit a form using the Design View window. The actual contents of this file include o The InitializeComponent method This method is mentioned in the file Form1. cs. The statements inside this method set the properties of the controls you added to the form in the Design View. (Methods are discussed in Chapter 3. ) Some of the statements in this method that correspond to the actions you performed using the Properties window are shown below .. common soldier void InitializeComponent() this. label1 = new System. Windows. Forms. Label() this. userName = new System. Windows. Forms. TextBox() this. ok = new System. Windows. Forms. Button() this. label1. Text = Enter your name this. userName. Text = here this. ok. Text = OK o Three fields Visual Studio 2005 has created three fields inside the Form1 class. These fields appear near the end of the file tete-a-tete System. Windows. Forms. Label label1 19 SREEKANTH C STEP BY STEP private System. Windows. Forms. TextBox userName private System. Windows. Forms. Button ok .. These fields implement the three controls you added to the form in Design View. (Fields are discussed in Chapter 7. ) It is worth restating that although this file is interesting to look at, you should never edit its contents yourself. Visual Studio 2005 automatically updates this file when you make changes in the Design View. Any code that you need to write yourself should be place in the Form1. cs file. At this point you might well be wondering where the Main method is and how the form gets displayed when the application runs remember that Main defines the point at which the program starts.In the Solution Explorer, you should notice another source file called Program. cs. If you double-click this file the following code appears in the Code and Text Editor window namespace WinFormHello static class Program /// /// The main entry point for the application. /// STAThread static void Main() Appl ication. EnableVisualStyles() Application. Run(new Form1()) You can ignore most of this code. However, the key statement is Application. Run(new Form1()) This statement creates the form and displays it, whereupon the form takes over. In the following exercise, youll learn how to add code that runs when he OK button on the form is clicked. Write the code for the OK button 1. Click the Form1. csDesign tab above the Code and Text Editor window to display Form1 in the Design View. 2. Move the mouse pointer over the OK button on the form, and then double-click the button. The Form1. cs source file appears in the Code and Text Editor window. Visual Studio 2005 has added a method called ok_Click to the Form1 class. (It has also added a statement to the InitializeComponent method in the Form1. Designer. cs file to automatically call ok_Click when the OK button is 20 SREEKANTH C STEP BY STEP clicked.It does this by using a delegate type delegates are discussed in Chapter 16, Delegates and Events. ) 3. Type the MessageBox statement shown below inside the ok_Click method. The complete method should look like this 4. private void ok_Click(object sender, System. EventArgs e) 5. 6. MessageBox. Show(Hello + userName. Text) Make sure you have typed this code exactly as shown, including the trailing semicolon. Youre now ready to run your first Windows program. Run the Windows program 1. On the Debug menu, click Start Without Debugging. Visual Studio 2005 saves your work, compiles your program, and runs it.The Windows form appears 2. Enter your name, and then click OK. A message box appears welcome you by name. 3. Click OK in the message box. The message box closes. 4. In the Form1 window, click the Close button (the X in the upper-right corner of the form). The Form1 window closes. If you want to continue to the next chapter Keep Visual Studio 2005 running, and turn to Chapter 2. If you want to exit Visual Studio 2005 now On the File menu, click Exit. If you see a Save dialog box, click Yes to save your work. Chapter 1 Quick Reference TO Do this KeyCombination 21 SREEKANTH C STEP BY STEP Create a onsole application new On the File menu, point to New, and then click Project to open the New Project dialog box. For the project type, select Visual C. For the template, select Console Application. Select a directory for the project files in the Location box. Choose a name for the project. Click OK. Create a Windows application new On the File menu, point to New, and then click Project to open the New Project dialog box. For the project type, select Visual C. For the template, select Windows Application. Select a directory for the project files in the location box. Choose a name for the project.Click OK. Build application F6 the On the Build menu, click Build Solution. Ctrl+F5 Chapter 2 Working with Variables, Operators, and Expressions After completing this chapter, you will be able to Understand statements, identifiers, and keywords. Use variable s to store information. Work with primitive data types. Use arithmetic operators such as the plus sign (+) and the minus sign (). Increment and decrement variables. In Chapter 1, Welcome to C, you learned how to use the Microsoft Visual Studio 2005 programming environment to build and run a console program and a Windows Forms application.In this chapter, youll be introduced to the elements of Microsoft Visual C syntax and semantics, including statements, keywords, and identifiers. Youll playing area the primitive types that are built into the C language and the characteristics of the cling tos that each type holds. Youll also see how to declare and use local variables (variables that exist alone within a function or other small section of code), learn about the arithmetic operators that C provides, learn how to use operators to manipulate sets, and learn how to control buildings containing two or more operators. Understanding StatementsA statement is a command that performs an action. Statements are found inside methods. Youll learn more about methods in Chapter 3, Writing Methods and Applying Scope, but for now, think of a method as a named sequence of statements inside a class. Main, which was introduced in the previous chapter, is an example of a method. Statements in C must follow a well-defined set of rules. These rules are collectively known as syntax. (In contrast, the specification of what statements do is collectively known as semantics. ) One of the simplest and most important C syntax rules states 22 SREEKANTH C STEP BY STEP hat you must terminate all statements with a semicolon. For example, without its terminating semicolon, the following statement wont compile Console. WriteLine(Hello World) TIP C is a free format language, which means that white space, such as a space character or a new line, is not significant except as a separator. In other words, you are free to lay out your statements in any style you choose. A simple, consistent layou t style makes a program easier to read and understand. The trick to programming well in any language is learning its syntax and semantics and then using the language in a natural and idiomatic way.This approach makes your programs readable and easy to modify. In the chapters throughout this book, youll see examples of the most important C statements. Using Identifiers Identifiers are the names you use to identify the elements in your programs. In C, you must adhere to the following syntax rules when choosing identifiers You can use only letters (uppercase and lowercase), digits, and underscore characters. An identifier must start with a letter (an underscore is considered a letter). For example, result, _score, footballTeam, and plan9 are all valid identifiers, whereas result%, footballTeam$, and 9plan are not.IMPORTANT C is a case-sensitive language footballTeam and FootballTeam are not the same identifier. Identifying Keywords The C language reserves 77 identifiers for its own u se, and you should not apply these identifiers for your own purposes. These identifiers are called keywords, and each has a particular meaning. Examples of keywords are class, namespace, and using. Youll learn the meaning of most of the keywords as you proceed through this book. The keywords are listed in the following table. abstract break char continue do event finally foreach in is as byte checked decimal double explicit fixed goto int ock base case class default else extern float if interface long 23 bool catch const delegate enum false for implicit internal namespace SREEKANTH new out protected return sizeof struct true ulong using while C STEP BY STEP null override public sbyte stackalloc switch try unrestrained virtual object params readonly sealed static this typeof unsafe void operator private ref short string throw uint ushort volatile TIP In the Visual Studio 2005 Code and Text Editor window, keywords are colored blue when you type them. TIP In the Visual Studio 2005 Co de and Text Editor window, keywords are colored blue when you type them.Using Variables A variable is a storage location that holds a entertain. You can think of a variable as a box holding temporary information. You must give each variable in a program a unique name. You use a variables name to refer to the prise it holds. For example, if you want to store the value of the cost of an item in a store, you might create a variable simply called cost, and store the items cost in this variable. Later on, if you refer to the cost variable, the value retrieved will be the items cost that you put there earlier. Naming VariablesYou should consider a naming convention for variables that help you avoid confusion concerning the variables you have defined. The following list contains some general recommendations Dont use underscores. Dont create identifiers that differ only by case. For example, do not create one variable named myVariable and another named MyVariable for use at the same ti me, because it is too easy to get them confused. NOTE Using identifiers that differ only by case can limit the ability to reuse classes in applications developed using other languages that are not case sensitive, such as Visual Basic. Start the name with a lowercase letter.In a multiword identifier, start the second and each subsequent word with an uppercase letter. (This is called camelCase notation. ) Dont use Hungarian notation. (Microsoft Visual C++ developers reading this book are probably familiar with Hungarian notation. If you dont know what Hungarian notation is, dont worry about it ) 24 SREEKANTH C STEP BY STEP IMPORTANT You should treat the first two recommendations as compulsory because they relate to Common Language Specification (CLS) compliance. If you want to write programs that can interoperate with other languages, such as Microsoft Visual Basic .NET, you need to comply with these recommendations. For example, score, footballTeam, _score, and FootballTeam are al l valid variable names, but only the first two are recommended. Declaring Variables Remember that variables are like boxes in memory that can hold a value. C has many different types of determine that it can store and processintegers, floating-point numbers, and strings of characters, to name three. When you declare a variable, you must specify what type of data it will hold. NOTE Microsoft Visual Basic programmers should note that C does not allow implicit declarations.You must explicitly declare all variables before you can use them if you want your code to compile. You declare the type and name of a variable in a declaration statement. For example, the following statement declares that the variable named age holds int (integer) values. As always, the statement must be terminated with a semi-colon. int age The variable type int is the name of one of the primitive C typesinteger which is a whole number. (Youll learn about several primitive data types later in this chapter. ) After youve declared your variable, you can assign it a value. The following statement assigns age the value 42.Again, youll see that the semicolon is required. age = 42 The equal sign (=) is the assignment operator, which assigns the value on its right to the variable on its left. After this assignment, the age variable can be used in your code to refer to the value it holds. The next statement writes the value of the age variable, 42, to the console Console. WriteLine(age) TIP If you leave the mouse pointer over a variable in the Visual Studio 2005 Code and Text Editor window, a ToolTip appears telling you the type of the variable. Working with Primitive Data Types C has a number of built-in types called primitive data types.The following table lists the most commonly used primitive data types in C, and the ranges of values that you can store in them. 25 SREEKANTH C STEP BY STEP Data type int Description Size (bits) *Range Sample usage intact numbers 32 int count count = 42 long Whole numbers (bigger range) 64 float Floating-point numbers 32 231 through 2311 263 through 2631 3. 4 ? 1038 double Double accurate) numbers decimal Monetary values 128 string Sequence of characters 16 bits per Not applicable character char Single character 16 bool Boolean 8 precision (more 64 floating-point 1. 7 ? 10308 28 significant igures long wait wait = 42L float away away = 0. 42F double trouble trouble = 0. 42 decimal coin coin = 0. 42M string vest vest = 42 char grill grill = 4 0 through 216 1 bool teeth true or false teeth false = *The value of 216 is 32,768 the value of 231 is 2,147,483,648 and the value of 263 is 9,223,372,036,854,775,808. Unassigned Local Variables When you declare a variable, it contains a random value until you assign a value to it. This behavior was a rich source of bugs in C and C++ programs that created a variable and used it as a source of information before giving it a value.C does not allow you to use an unassigned variable. You must assign a value to a variable before you can use it, otherwise your program will not compile. This requirement is called the Definite Assignment Rule. For example, the following statements will generate a compile-time error because age is unassigned int age Console. WriteLine(age) // compile time error Displaying Primitive Data Type Values In the following exercise, youll use a C program named PrimitiveDataTypes to demonstrate how several primitive data types work. Display primitive data type values 26SREEKANTH C STEP BY STEP 1. Start Visual Studio 2005. 2. On the File menu, point to Open, and then click Project/Solution. The Open Project dialog box appears. 3. Move to the Microsoft PressVisual CSharp Step by StepChapter 2PrimitiveDataTypes folder in your My Documents folder. Select the file PrimitiveDataTypes. sln and then click Open. The solution loads, and the PrimitiveDataTypes project. Solution Explorer displays the solution and NOTE Solution file names have the . sln suffix, such as Primitive DataTypes. sln. A solution can contain one or more projects.Project files have the . csproj suffix. If you open a project rather than a solution, Visual Studio 2005 will automatically create a new solution file for it. If you build the solution, Visual Studio 2005 automatically saves any updated or new files, and you will be prompted to provide a name and location for the new solution file. 4. On the Debug menu, click Start Without Debugging. The following application window appears 5. In the Choose A Data type list, click the string type. The value 42 appears in the Sample value box. 6. Click the int type in the list.The value to do appears in the Sample value box, indicating that the statements to display an int value still need to be written. 27 SREEKANTH C STEP BY STEP 7. Click each data type in the list. Confirm that the code for the double and bool types also needs to be completed. 8. Click Quit closing the window and stopping the program. Control returns to the Visual Studio 2005 programming environment. Use primitive data types in code 1. Right-click the Form1. cs file in the Solution Explorer and then click View Code. The Code and Text Editor window opens displaying the Form1. cs file. 2.In the Code and Text Editor window, find the show Float Value method listed here private void showFloatValue() float var var = 0. 42F value. Text = 0. 42F TIP To locate an item in your project, point to Find And Replace on the Edit menu and click Quick Find. A dialog box opens asking what you want to search for. Type the name of the item youre looking for, and then click Find Next. By default, the search is not case-sensitive. If you want to perform a case-sensitive search, click the + button next to the Find Options label to display additional options, and check the Match Case check box.If you have time, you can experiment with the other options as well. You can also press Ctrl+F (press the Control key, and then press F) to display the Quick Find dialog box rather then usin g the Edit menu. Similarly, you can press Ctrl+H to display the Quick Find and Replace dialog box. The showFloatValue method runs when you click the float type in the list box. This method contains three statements The first statement declares a variable named var of type float. The second statement assigns var the value 0. 42F. (The F is a type suffix specifying that 0. 2 should be treated as a float value. If you forget the F, the value 0. 42 will be treated as a double, and your program will not compile because you cannot assign a value of one type to a variable of a different type in this way. ) The third statement displays the value of this variable in the value TextBox on the form. This statement requires a little bit of your attention. The way in which you display an item in a TextBox is to set its Text property. You did this at 28 SREEKANTH C STEP BY STEP design time in Chapter 1 using the Properties window. This statement shows ou how to perform the same task prog rammatically, using the expression value. Text. The data that you put in the Text property must be a string (a sequence of characters), and not a number. If you try and assign a number to the Text property your program will not compile. For this reason, the statement simply displays the text 0. 42F in the TextBox (anything in double-quotes is text, otherwise known as a string). In a real-world application, you would add statements that convert the value of the variable var into a string and then put this into the Text property, but you need to know a little bit more about C and the .NET Framework before we can do that (we will cover data type conversions in Chapter 11, Understanding Parameter Arrays, and Chapter 19, Operator Overloading). 3. In the Code and Text Editor window, locate the showIntValue method listed here private void showIntValue() value. Text = to do The showIntValue method is called when you click the int type in the list box. TIP Another way to find a method in t he Code and Text Editor window is to click the Members list that appears above the window, to the right. This window displays a list of all the methods (and other items).You can click the name of a member, and you will be taken directly to it in the Code and Text Editor window. 4. Type the following two statements at the start of the showIntValue method, after the open curly brace int var var = 42 The showIntValue method should now look like this private void showIntValue() int var var = 42 value. Text = to do 5. On the Build menu, click Build Solution. a. The build will display some warnings, but no errors. You can ignore the warnings for now. 6. In the original statement, change the string to do to 42. b. The method should now look exactly like this 9 SREEKANTH C STEP BY STEP c. private void showIntValue() d. i. int var ii. var = 42 iii. value. Text = 42 e. 7. On the Debug menu, click Start Without Debugging. f. The form appears again. g. TIP If you have emended the source co de since the last build, the Start Without Debugging command automatically rebuilds the program before starting the application. 8. Select the int type in the list box. Confirm that the value 42 is displayed in the Sample value text box. 9. Click Quit to close the window and stop the program. 10. In the Code and Text Editor window, find the showDoubleValue method. 1. Edit the showDoubleValue method exactly as follows private void showDoubleValue() double var var = 0. 42 value. Text = 0. 42 12. In the Code and Text Editor window, locate the showBoolValue method. 13. Edit the showBoolValue method exactly as follows private void showBoolValue() bool var var = false value. Text = false 14. On the Debug menu, click Start Without Debugging. The form appears. 15. In the list, select the int, double, and bool types. In each case, verify that the correct value is displayed in the Sample value text box. 16. Click Quit to stop the program.Using Arithmetic Operators C shop ats the regular arithmetic operations you learned in your childhood the plus sign (+) for addition, the minus sign () for subtraction, the asterisk (*) for multiplication, and the forward slash (/) for division. These symbols (+, , *, and /) are called operators as they operate on values to create new values. In the following 30 SREEKANTH C STEP BY STEP example, the variable moneyPaidToConsultant ends up holding the product of 750 (the daily rate) and 20 (the number of days the consultant was employed) long moneyPaidToConsultant oneyPaidToConsultant = 750 * 20 NOTE The values that an operator operates on are called operands. In the expression 750 * 20, the * is the operator, and 750 and 20 are the operands. Determining an Operators Values Not all operators are applicable to all data types, so whether you can use an operator on a value depends on the values type. For example, you can use all the arithmetic operators on values of type char, int, long, float, double, or decimal. However, with one exce ption, you cant use the arithmetic operators on values of type string or bool.So the following statement is not allowed because the string type does not support the minus operator (subtracting one string from another would be meaningless) // compile time error Console. WriteLine(Gillingham Manchester City) The exception is that the + operator can be used to concatenate string values. The following statement writes 431 (not 44) to the console Console. WriteLine(43 + 1) TIP You can use the method Int32. Parse to convert a string value to an integer if you need to perform arithmetic computations on values held as strings.You should also be aware that the type of the result of an arithmetic operation depends on the type of the operands used. For example, the value of the expression 5. 0 / 2. 0 is 2. 5 the type of both operands is double (in C, literal numbers with decimal points are always double, not float, in order to maintain as much accuracy as possible), and so the type of the res ult is also double. However, the value of the expression 5 / 2 is 2. In this case, the type of both operands is int, and so the type of the result is also int. C always rounds values down in dowry like this.The situation gets a little more complicated if you mix the types of the operands. For example, the expression 5 / 2. 0 consists of an int and a double. The C compiler detects the mismatch and generates code that converts the int into a double before performing the operation. The result of the operation is therefore a double (2. 5). However, although this works, it is considered poor practice to mix types in this way. C also supports one less-familiar arithmetic operator the remainder, or modulus, operator, which is represented by the percent symbol (%). The result of x % y is the remainder after dividing x by y.For example, 9 % 2 is 1 since 9 divided by 2 is 8, remainder 1. NOTE In C and C++, you cant use the % operator on floating-point values, but you can use it in C. Examini ng Arithmetic Operators 31 SREEKANTH C STEP BY STEP The following exercise demonstrates how to use the arithmetic operators on int values using a previously written C program named MathsOperators. Work with arithmetic operators 1. On the File menu, point to Open, and then click Project/Solution. Open the MathsOperators project, located in the Microsoft PressVisual CSharp Step by StepChapter 2MathsOperators folder in your My Documents folder. . On the Debug menu, click Start Without Debugging. A form appears on the screen. 3. Type 54 in the left operand text box. 4. Type 13 in the right operand text box. You can now apply any of the operators to the values in the text boxes. 5. Click the Subtraction option, and then click Calculate. The text in the Expression box changes to 54 13, and 41 appears in the Result box, as shown in the following graphic 6. Click the / Division option, and then click Calculate. The text in the Expression text box changes to 54 / 13, and the number 4 appea rs in the Result box. In real life, 54 / 13 is 4. 53846 recurring, but this is not real life this is C In C, when you divide one integer by another integer, the answer you get back is an integer, as explained earlier. 32 SREEKANTH C STEP BY STEP 7. Select the % Remainder option, and then click Calculate. The text in the Expression text box changes to 54 % 13, and the number 2 appears in the Result box. This is because the remainder after dividing 54 by 13 is 2 (54 ((54 / 13) * 13) is 2 if you do the arithmetic rounding down to an integer at each stagemy old maths master at school would be horrified to be told that (54 / 13) * 13 does not equal 54 . 8. Practice with other combinations of numbers and operators. When youre finished, click Quit. The program stops, and you return to the Visual Studio 2005 programming environment. Now take a look at the MathsOperators program code. Examine the MathsOperators program code 1. Display the Form1 form in the Design View window (click the Form 1. csDesign tab if necessary). TIP You can quickly switch between the Design View window and the Code and Text Editor displaying the code for a form by pressing the F7 key. 2. In the View menu, point to Other Windows and then click Document delimitate.The Document Outline window appears showing the names and types of the controls on the form. If you click each of the controls on the form, the name of the control is highlighted in the Document Outline window. 33 SREEKANTH C STEP BY STEP IMPORTANT Be careful not to accidentally delete or change the names of any controls on the form while viewing them in the Document Outline window. The application will no longer work if you do. 3. Click the the two TextBox controls that the user types numbers into on the form. In the Document Outline window, verify that they are named lhsOperand and rhsOperand.When the form runs, the Text property of each of these controls holds (as strings) the numeric values you enter. 4. Towards the bottom of the form, verify that the TextBox control used to display the expression being evaluated is named expression, and that the TextBox control used to display the result of the calculation is named result. At runtime, setting the Text property of a TextBox control to a string value causes that value to be displayed. 5. Close the Document Outline window. 6. Press F7 to display the Form1. cs source file in the Code and Text Editor window. 7.In the Code and Text Editor window, locate the subtractValues method private void subtractValues() int lhs = int. Parse(lhsOperand. Text) int rhs = int. Parse(rhsOperand. Text) int outcome outcome = lhs rhs expression. Text = lhsOperand. Text + + rhsOperand. Text result. Text = outcome. ToString() The first statement in this method declares an int variable called lhs and initializes it to the result of the explicit conversion of the lhsOperand. Text property to an int. (The Text property of a TextBox is a string, and must be converted to an integer b efore you can store it in an int. This is what the int.Parse method does) The second statement declares an int variable called rhs and initializes it to the result of the explicit conversion of the rhsOperand. Text property to an int. The third statement declares an int variable called outcome. The fourth statement subtracts the value of the rhs variable from the value of the lhs variable, and the result is assigned to outcome. The fifth statement concatenates three strings (using the + operator) and assigns the result to the expression. Text property. The sixth statement converts the int value of outcome to a string by using the ToString method, and assigns the string to the result.Text property. 34 SREEKANTH C STEP BY STEP The Text Property and the ToString Method I mentioned earlier that TextBox controls displayed on a form have a Text property that allows you to access the displayed contents. For example, the expression result. Text refers to the contents of the result text box on the form. Text boxes also have many other properties, such as the location and size of the text box on the form. You will learn more about properties in Chapter 14, Implementing Properties to Access Attributes. Every class has a ToString method.The purpose of ToString is to convert an object into its string representation. In the previous example, the ToString method of the integer object, outcome, is used to convert the integer value of outcome into the equivalent string value. This conversion is necessary because the value is displayed in the Text property of the result fieldthe Text property can only contain strings. When you Controlling Precedence Precedence governs the order in which an expressions operators are evaluated. Consider the following expression, which uses the + and * operators 2+3*4This expression is potentially ambiguous does 3 bind to the + operator on its le