Free Essay

Control Stuctures

In:

Submitted By siege
Words 486
Pages 2
Control Structure

INTRODUCTION
Control structures are used in programming to help the computer make decisions. (Drake & Venit, 2011). The structure helps the user enjoy a far easier experience than having to manually type or calculate every step of the program. A computer may be used to compute a set of numbers to find their average and then display a notification to the user that the average does not meet the user's requirements. In this paper, we will show a simple control structure that can be used to aid in warning the user that an item in the in-house mini-mart does not need to be purchased any longer.
In the previous paper, we defined a problem for the Parking Services department and used the first step of the Program Development Cycle (PDC) to analyze the problem and then began to design a solution. The Parking Services Department would like to have a way to keep track of which items in their mini-mart should continue to be purchased and which items they can discontinue purchasing.
IDENTIFYING THE CONTROL STUCTURE
Identifying a control structure can be as simple as determining where in the program a user will need to make a choice. The user would then input their choice and, based off the user's input, the computer would then choose to do one thing or another. Another example would be a program that displays a notification to the user only if a certain condition is met. A good example would be to use the program being written for the Parking Services Department. Suppose the supervisors would like the program display a notification on the screen to the user when it identifies an item is purchased far less than expected.
The best way to determine whether or not an item in the mini-mart is purchased less than expected would be to find the average number purchased by the officers in a week. The programmer would set a variable for the average to be stored. The average work week is five days. The variable named "avg" would be computed once the user input 5 numbers. The calculation is made and the average is displayed. This average would be set as a condition in a control structure that would then display a notification to the supervisor indicating that a particular item is sold less than expected.
The average, being a variable declared earlier in the program code, would be used by the computer to notify when an item is purchase less than a defined threshold. For example:
The computer would calculate the average for each item. Once the calculation has been made, depending on the item threshold, the computer would display a message such as, "Item is purchased less than desired amount." If an item is purchased more than the threshold allows, the computer would display nothing. The pseudocode for this structure would look as follows:
If Avg

Similar Documents

Premium Essay

Life Style Inventory Report

...to maintain position through security needs by task-related activities. After taking the LSI survey my primary and secondary styles of thinking fall under aggressive/defensive thinking. My limiting style of thinking falls under passive/defensive thinking. My primary thinking style, power, measures your self-worth to a degree that we can control and dominate others. Power thinkers lack confidence in others and try to establish their feelings of self-importance. Power thinkers are characterized to be aggressive and to have a rigid way of thinking. Power thinkers have a high need for control, power, prestige, and status. Power thinkers dictate the actions of others and they are threatened by undermined authority. Consequently, the qualities I found to be true about me regarding power is that I have a lot of aggression, lack confidence in others, and I have a high need of control and influence. At work I like to influence my coworkers to strive high and push towards things that they will improve their lives. I like to try and control my relationships and daily activities. Also, I have a tendency of trying to control situations that I have no control over. Furthermore, I disagree with the power style characterization. I use power to keep my daughters in line and my life in order. I...

Words: 1864 - Pages: 8

Premium Essay

Titlev11

...levels are at analyzing the environment? 2. “To manage transactions with the organizational environment effectively, managers should chart the forces in the organization’s specific and general environments, noting (a) the number of forces that will affect the organization, (b) the pattern of interconnectedness or linkages between these forces, (c) how rapidly these forces change, and (d) the extent and nature of competition, which affects how rich or poor the environment is.” (Managerial Implications, p. 73) Conduct a specific analysis of Yahoo’s environment, identifying each of the 4 factors listed above. 3. “Taking that analysis, managers should plan how to deal with contingencies. Designing inter-organizational strategies to control and secure access to scarce and valuable resources in the environment in which they operate is the first state in this process” (Managerial Implications, p. 73) 4. How is Resource Dependence Theory illustrated in Yahoo’s relations with its environment? 5. Illustrate the concepts of symbiotic and competitive interdependence, using Yahoo’s case history. Did Yahoo effectively manage its interdepencies? 6. As a consumer, how would you rate Yahoo against its major competitor Google? Why? Part I. Identification of Problems (2-4 pages) Using only the information provided in the case, identify and explain the problems that the company is having. In...

Words: 319 - Pages: 2

Premium Essay

Pdf, Doc.

...Telstra suffered from an embarrassing situation which risked losing its position of dominance. The main reason for this is that its management structure, that is, classical management. The report will argue that the problem of classical management and offer a recommendation for this situation. From this case, it is clearly to identify the management problem is that classical management. There are some facts, which can prove this. One of the fact is that the organization assets were privatised in a way that allowed the organization to function as a monopoly. In addition, another fact is that Telstra block competitors' access to the network. Both of these examples emphasize Telstra aimed at controlling others. Telstra control market by controlling competitors in order that it is a monopoly. According to William C, the classical management focus is controlling others(1992). In terms of investment, Telstra invest $300 million in upgrading network, and they want to get all providers to use this network. This means Telstra maximize return on investment, they also focus on short-term goals. William C stated that the classical management revolves managers are seen as keepers of scorecards who manage toward short-term goals and they maximize return on investment(1992). All of this facts are in accordance with classical management models. In view of the above-mentioned facts, a recommendation is provided. Telstra should adopt new paradigm management. According to William C, the...

Words: 418 - Pages: 2

Premium Essay

Gm520

...the storage of products, and their primary purpose is to maximize the usage of available storage space. Distribution centers emphasize the rapid movement of products through a facility, and they attempt to maximize the throughput. 4. Cross-docking is a process where a product is received in a facility, occasionally married with product going to the same destination, then shipped at the earliest opportunity, without going into long-term storage. This could affect warehousing design as cross-docking is more desirable by allowing more receiving and outgoing delivery doors, or a bigger floor space to handle more product movements. 6. The advantages of private warehousing are: cost is spread over more units of inventory, more control over storage needs, control over product placement within the facility, and access to product whenever the company needs. A few disadvantages are: initial cost is very high, fluctuating demand means loss of productive space, high interest rates cause more cost for financing, and a reduction in the company’s flexibility in relation to their external environment. 11. The trade-off between order-picking versus stock-replenishing is: keeping both teams working on the same floor at the same time will save on managerial personnel being needed, it will also cause congestion. 18. To start with, hazardous materials means that enhanced security focusing on people, facilities, and processes must occur. Secondly, proper documentation and signage needs to be able...

Words: 273 - Pages: 2

Premium Essay

Doc, Pdf

...INTRODUCTION Every human been has several needs and desires. But no individual can satisfy all his wants. Therefore, people work together to meet their mutual needs which they cannot fulfill individually. Moreover, man is a social being as he likes to live together with other people. It is by working and living together in organized groups and institutions that people satisfy their economic and social needs. As a results there are several types of groups, eg..; family, school, government, army, a business firm, a cricket team and the like. Such formal groups can achieve their goals effectively only when the efforts of the people working in these groups are properly coordinated and controlled. The task of getting results through others by coordinating their efforts is known as management. Just as the mind coordinates and regulates all the activity of a person, management coordinates and regulates the activities of various members of an organization. Every organization, regardless of size, has developed and implemented its own management in order for it to run smoothly and accomplish the vision, goals and objectives it has set forth. As such, the basic function of management, broken down into four different areas, allow for it to handle strategic, technical and operational decisions for the organization. The four function of management are: planning, organizing, directing and controlling. PLANNING Planning is the core area of all function of management. It is the foundation...

Words: 378 - Pages: 2

Premium Essay

Lockbox Ethics Paper

...in our Contemporary Management textbook, our class was assigned to determine if Mr. Edens’ behavior was ethical and acceptable or unethical and unacceptable. Secondly, we needed to provide the rationale for our answers and provide examples. Mr. Edens has created a highly controlled workplace with close manager supervision and surveillance. Even though I don’t agree with this environment, I think Mr. Edens’ behavior has been ethical and acceptable. Lockbox Processing: No Place to Hide Mr. Edens’ company, Electronic Banking System Inc., specializes in “lockbox processing.” Due to the sensitive nature of this financial service, Mr. Edens has implemented many controls to monitor his employees. Workers handle thousands of dollars in checks and cash, and thus they need to be monitored closely. These controls are designed to limit theft which reassures customers that their money is safe. Managers sit at the front of the room on raised platforms; other supervisors watch employees from the rear. While some may consider this approach intrusive, these techniques exist in many workplaces today where employees come in direct contact with money. Mr. Edens’ employees work in an area called “the cage.” No talking is permitted, the windows are covered, and many common items that workers usually have at their desks are banned. Mr. Edens is able to monitor this environment with a series of eight cameras which have the ability to zoom in closer on employee’s activities. Personally...

Words: 693 - Pages: 3

Premium Essay

Miss

...scientific management which is a scientific approach to management that requires all tasks in organizations are analyzed, routinized, divided and standardized in depth instead of using rules of thumb (Buelens et al, 2011). The scientific management was developed because that production at his time was controlled by the workers in terms of the pace and nature of production, which was viewed by him as the cause for inefficient production. He then divided tasks into subtasks and eliminated the unnecessary subtasks to get an optimal time. Each task had to be performed in the best way and workers have no right to choose how to do their tasks (Buelens et al, 2011). Thus, through removing employees’ discretion over the work, managers were able to control over the method and pace of working, and to take the responsibility for planning each activity to ensure that every step was in line with business objectives. Moreover, based on the assumption that workers can not be trusted to perform their jobs diligently, work activities were tightly controlled through supervision and monitoring. However, Taylor believed that people were rational beings who could be motivated through financial incentives. Piece rate reward system was used to reward people when they reached a certain target (Buelens et al, 2011). Critiques of Taylorism mostly come from humanistic side. Although social scientists agree that modern management methods have led to greater material wealth and thus a higher standard of life...

Words: 812 - Pages: 4

Premium Essay

Finance

...with the number of products that are produced for sale. Example of these costs includes wages of production, electricity power to run machines, raw materials and the cost of maintaining inventory. These costs fluctuate depending on the activity of the business and should be controlled for the business to accrue profits. Various strategies can be employed to control variable costs (Bragg, 2011). Products and service provided need to be scrutinized in order to find out the most cost effective one. The costs can be reduced by reducing the production of products that provide least profits while at the same time investing in products that are more lucrative. For example, raw material can be scrutinized to find out the best sources that will be more cost effective in the production of various products. Another way to control the costs is to cut expenditure on fluctuating costs such as employee salaries and advertising costs before targeting the fixed costs like utilities and rent. Reducing fixed costs can put strain on the operational and financial status of the business compared to when variable costs are cut. This control strategy may be challenging especially in the case where there is stiff competition. For instance, to be able to compete favorably in...

Words: 874 - Pages: 4

Premium Essay

Life Is Good

...------------------------------------------------- life is good (case study) FOM September 6, 2014 utban ali I13-0862 September 6, 2014 utban ali I13-0862 Q1.As the top managers of the company what types of issues might Bert and john have to deal with? Be as specific as possible. What management functions might be most important to them? Why? A1. The number of issues and problems they might face may vary from time to time as they depend on a number of things. As the top managers of the company they have to make very important and big decisions such as which market are they going to target and also which partners they have to cooperate. They might face issues relating to communication as if a company wants to progress the top managers have to make sure that their message is delivered to the employees and also that the message of employees is delivered to them. Effective teamwork depends on a culture of open communication, where superiors and subordinates can freely discuss progress and problems. Employees who feel that their bosses are distant or somehow “off limits” have a tendency to make mistakes that could have been avoided had parties felt more comfortable talking to each other. Being Leaders they are often responsible for helping build unity between staff members. It can take a bit of time for workers to develop trusting relationships with one another, and the role of a supervisor or managers is to set the proper framework to encourage these relationships to...

Words: 1061 - Pages: 5

Premium Essay

Matrix

...manager knows its organizations structure very well and also analyzed the structure, he/she handle the required approach for change process. Achieving the desired outcomes for the change process are crucial. Using change images helps to achieve the desired outcomes from the change process. Reaching planned and intended outcomes will be easier with the change images approaches. Six images of change helps to control and shape the changing process. Change manager as a director indicates controlling process. Several steps should be followed for a successful change process. If director follows the certain steps for change, intended outcomes will be achieved. These several steps should be used for change managers. In this first image, control is the heart of the change process. In the second image change manager as a navigator, change manager is not have the all control authority. Outcomes are at least partly emergent rather than completely planned and result from a variety of influences, competing interest and processes. A change manager can establish a team, but can not control the effective work of...

Words: 542 - Pages: 3

Premium Essay

Valley Wide Utilities Case Study

...Valley Wide Utilities Case Study Problems Macro The company was faced with financial inefficiencies resulting from an expansion of its facilities. Three years prior, under advisement from outside firm, Valley Wide implemented an MBO program to evaluate department managers, sales engineers, and consumer service employees. President Delgado appointed John Givens and Hilda Hirsh to provide a broad outline of MBO performance standards, identify key standards controlling performance, and more specifically, isolate goals not easily attained. Micro At the beginning stages, negative feedback was received, but eventually departments came around. During the first year participation was encouraged, employees set high goals, productivity increased, and rewards were obtained. However, in the course of the past year, performance evaluation problems are surfacing, dissatisfaction is emerging, managers are stating MBO standards are too tight and unfair, and workers are threatening to leave. Causes John and Hilda may not have the knowledge or skills to evaluate and change performance levels of individuals or teams. Manager and line supervisors should be participating in MBO programs. They can assist by identifying deficiencies, facilitating process improvements, and measuring goals and objectives Other departments started complaining that Hirsh was only looking for failure to report under the cover of the MBO system. There is no trust in this company due to management...

Words: 447 - Pages: 2

Free Essay

Positive Behavior Supports

...Discipline and Management Comparison Grand Canyon University EDU 536 – Encouraging Academic Success through Classroom Management August 4, 2013 There are many different variations from many different publications that attempt to define discipline and management, as well as behavior and misbehavior and many experts have discussed how each should be defined and compared. There have been many books published on the subject of classroom discipline (Butchart, 1995). Charles suggests in the text, Building Classroom Discipline, many different strategies that can be used in the classroom regarding discipline (Charles, 2011). The dictionary Merriam-Webster defines discipline as punishment or control gained by enforcing obedience or order. Many different experts weigh in on how classroom discipline factors in with classroom management. Classroom management and discipline seem to work together in each being a key component of each other. According to the text, a teacher must find a system of discipline that works for their classroom. The text also suggests that discipline has 3 goals, productive learning environments are established, students become more responsible, and it promotes overall civility of the total class (Charles, 2011). And that discipline approach should be organized to fit your students needs for your particular classroom. This discipline approach should allow for effective management of the classroom, thus preventing wasted...

Words: 585 - Pages: 3

Premium Essay

Hotel

...Restaurant Management The Bachelor of Science in Hotel and Restaurant Management (BSHRM) program is geared towards equipping students with the necessary knowledge, skills and attitude to provide quality service in the hospitality industry. The program contains subjects that will address the needs of different sectors in the hospitality industry, such as culinary, front office, tourism, resort and hotel operations. Its primary concentration is on the development of practical and management skills which are achieved through the combination of theoretical classes, practicum exercises and experiential learning. Graduates of this course will possess business management and accounting skills to be able to compute daily sales, recipe costing/cost control and inventory management. The program also helps students to develop effective communication and interpersonal skills which are essential in establishing positive employer/employee/customer relations. There are no specific skills required for BSHRM because everything can be learned. However, you need to possess certain attitudes and qualities for you to succeed in this course:  First, you have to be comfortable giving service to others. This means that you enjoy and take pride in your work; Secondly, you must be approachable and friendly while maintaining professionalism; most importantly, you have to be an effective communicator, both in written and oral English. You will meet and provide service to different people of different nationalities...

Words: 414 - Pages: 2

Premium Essay

Politicians and Religious Leaders

...seats of power. Usually, the person in power can be a very charming person and has no issues with speaking in a public forum. Natural public speakers can very easily slide into these positions with ease. Over time, the two main seats of power are found within a political and religious setting. At times, the two different factions have combined, making the position of power much more controlling than ever before. With the use of manipulation through fear, political and religious leaders have been able to use this particular method. This way of control is nowhere near a new tactic. In the beginning of life, there is always the aggressor within a group of living organisms. The human race has evolved over time, but there are some, almost instinctual tick that keeps them breaking down into an alpha mentality. The control over the pack using violence or oppression is nothing more than control through fear. Bullying is an example of control through fear that is used within the academic halls of school. Some of the worst cases found are usually within the years when a youth is attending their middle school. The bully is the most feared individual on the playground or in the gym. To the bullied, they only see blind hatred toward others. They cannot understand how one person treats others so poorly, knowing the consequences that these actions will take on the bully...

Words: 1526 - Pages: 7

Premium Essay

Reading Skills

...     2:Marketing Strategy Audit: Evaluate overall business goals and objectives for growth based on company's resources and opportunities, determine best strategies for growth based on market trends as well as company's resources and opportunities.     3:Marketing Organization Audit: Evaluate the different aspects of the companies marketing department including operations, marketing planning, analysis, implementation and control and the suitability to implement the strategy needed.Marketing Organization Audit focuses on 1.Formal structure 2.Functional Efficiency 3.Interface Efficiency.     4:Marketing Systems Audit: Evaluate if a company has appropriate and sufficient marketplace systems such as, sales forecasting, sales goal and quota setting, marketing planning, marketing control, inventory control, order processing, physical distribution, new products development, and product pruning implemented to aid in collecting information, plan for activities, controlling operations; and how effective the procedures used in these systems are in the control of the marketing...

Words: 252 - Pages: 2