Thursday, May 21, 2020

Friend and Protected Friend in VB.NET

Access modifiers (also called scoping rules) determine what code can access an element—that is, what code has permission to read it or write to it. In previous versions of Visual Basic, there were three types of classes. These have been carried forward to .NET. In each of these, .NET allows access only to code: Private - within the same module, class, or structure.Friend - within the same assembly.Public - anywhere in the same project, from other projects that reference the project, and from any assembly built from the project. In other words, any code that can find it. VB.NET has also added one and a half new ones. ProtectedProtected Friend The half is because Protected Friend is a combination of the new Protected class and the old Friend class. The Protected and Protected Friend modifiers are necessary because VB.NET implements the last OOP requirement that VB was missing: Inheritance. Previous to VB.NET, supercilious and disdainful C and Java programmers would belittle VB because it was, according to them, not fully object oriented. Why? Previous versions lacked inheritance. Inheritance allows objects to share their interfaces and/or implementation in a hierarchy. In other words, inheritance makes it possible for one software object that takes on all of the methods and properties of another one. This is often called the is-a relationship. A truck is-a vehicle.A square is-a shape.A dog is-a mammal. The idea is that more general and widely used methods and properties are defined parent classes and these are made more specific in child classes (often called subclasses). Mammal is a more general description than dog. Whales are mammals. The big benefit is that you can organize your code so you only have to write code that does something that lots of objects have to do once in the parent. All employees have to have an employee number assigned to them. More specific code can be part of the child classes. Only employees that work in the general office need to have an employee door card key assigned to them. This new capability of inheritance requires new rules, however. If a new class is based on an old one, Protected is an access modifier that reflects that relationship. Protected code can be accessed only from within the same class, or from a class derived from this class. You dont want employee door card keys being assigned to anyone except employees. As noted, Protected Friend is a combination of the access of both Friend and Protected. Code elements can be accessed either from derived classes or from within the same assembly, or both. Protected Friend can be used to create libraries of classes since code that accesses your code only has to be in the same assembly. But Friend also has that access, so why would you use Protected Friend? The reason is that Friend can be used in a Source file, Namespace, Interface, Module, Class, or Structure. But Protected Friend can only be used in a Class. Protected Friend is what you need for building your own object libraries. Friend is just for difficult code situations where assembly wide access is really required.

Wednesday, May 6, 2020

The National Target Program For Sustainable Poverty...

Analysis of the National Target Program for Sustainable Poverty Reduction (NTP-PR) The NTP-PR has contributed substantially to the reduction of poverty in Vietnam. Between 2006-2010 the program gave out 6.2 million preferential loans, and between 2007-2009 the program provided vocational training to roughly 100,000 poor workers, resulting in roughly 60 percent of those trained gaining employment or becoming self-employed. Between 2006-2010, 10 million students received total exemption of tuition, and 2.8 million impoverished ethnic minority children received free textbooks for school. What is more, an estimated 62 million individuals, 90 percent of whom were poor, received free health insurance cards in the same five-year period. The†¦show more content†¦The rationale of focusing on education is that, as demonstrated by Banerjee and Duflo’s work, improving education tends to create numerous positive externalities manifest both in health outcomes and in national economic growth. Policy 1: Implement a CCT program to increase school attendance among the rural poor. You should implement a CCT program, based on Columbia’s successful Familias en Accià ³n, in towns with fewer than 100,000 people, with strict conditions placed on both participating towns and families. First, towns must contain educational and health infrastructure to support individuals to meet the conditions of the program detailed. Towns also must include a bank, and an official with whom the central government can communicate. Second, parents must bring participating children to regular development check-ups, enabled by the health infrastructure mentioned above. Moreover, school-aged children must attend 80 percent of classes for the household to receive an additional monthly transfer. Transfers should be based on estimates of basic nutritional costs per person in each of the qualifying towns. Additional education transfers should be based on a fraction of this initial nutritional transfer, commensurate with the costs of living in each town. Under this program, household consumption will increase, school attendance will increase, and healthcare check-ups will

New Global Patterns Free Essays

For each term, person, or place listed at the beginning of the section, write a sentence explaining its significance. French Indochina – the name given to the colonies in Southeast Asia that were under French control. Significant of European imperialism in Asia and the pressure that was placed on it by Western and European powers. We will write a custom essay sample on New Global Patterns or any similar topic only for you Order Now Mongkut – the king of Siam who by studying modern science, mathematics, and language was able to uphold his country and keep it from European rule and pushed Siam into a period of modernization. Spanish-American War – a struggle between the United States and Spain over the independence of Cuba. Was significant in the US’s ability to win and take control of Cuba. Liliuokalani – the queen of Hawaii had attempted to resist foreign influences but did not succeed as the United States overpowered her. Led to the imperialism of all Pacific islands by European powers. 2. Reading Strategy: Identify Causes and Effects-How did industrialized powers divide up Southeast Asia and the Pacific, and how did the colonized peoples react? Powers such as the Dutch, British, and French were able to use the rivalries between local communities of Southeast Asia to their advantage by using new technologies and armies to conquer new colonies. In the Pacific the United States, Germany, and Britain had extraterritorial rights in Samoa and had a triple protectorate in action. Even after leaders of the former independent countries that became colonized tried to fight off foreign influence, the Western powers were always able to gain control of all except Siam. People of the colonies had pushed hard to resist the imperialist force and in the end after colonization, they adopted the ideals of the powers that controlled them by means of modernization. 3. Summarize – What steps did Siam take to preserve its independence? King Mongkut had studied foreign languages and on modern sciences and mathematics. He gained much knowledge and didn’t underestimate the power of the Europeans and took smarter approaches to resisting imperialism. He heavily negotiated with the Western powers by forming unequal treaties, much like the ones the Western powers had been using to take advantage of others. Mongkut was successful and was able to keep Siam out of the clutches of imperialism and soon after with the aid of his son Chulalongkorn was able to start a modernization movement to strengthen the country. Draw Conclusions – Why were Filipino rebels disappointed when the United States took control of the Philippines? During the Spanish-American War, the Philippines was able declare independence from Spain and decided to fight alongside the US to help in the effort. Rebels were disappointed because they had expected the US would acknowledge their independence after helping them defeat Spain. Instead, the US offered to buy Spain’s control of the Philippines for $20 million and the US was able to imperialize the Philippines which outrages rebels. 4. Synthesize Information – How did Hawaii become part of the United States? The US had been part of the triple protectorate between the US, Germany, and Britain. The US exclusively had pushed for power in Hawaii and the American planters were able to overthrow Liliuokalani and her efforts to halt Western influence and supporters of annexation convinced the US that if they did not act for power in Hawaii, other countries would soon interfere. This convinced the US to lock in its power in Hawaii. 6. Make Comparisons- Compare the partition of Southeast Asia to the partition of Africa. How was it similar? How was it different? I see the partition of Asia and Africa similarly in the sense that both means of imperialism were the same. The powers used the same tactics to partitions colonies in both areas. They used unequal treaties, used a country’s weakness to their advantage such as local conflicts, used new technologies and armies as a means of conquering, and made the same modernization changes to society such as education, politics, transportation, economy, societal, etc. The main difference I seemed to remember was that the reason for imperializing these two parts of the eastern world was for Africa, the main idea was always based on social Darwinism and there seemed to be less multiple protectorates in Africa than in Asia. Also the struggle for Africa was mainly for resource benefits as opposed to Southeast Asia where concern of resource supply wasn’t discussed in the section. How to cite New Global Patterns, Papers