Programming

 

Write a program that can be used to determine the tip amount that should be added to a restaurant charge. Allow the user to input the restaurant charge before taxes. Produce output showing the calculated value including the total amount due for both 15% and 20% tips. Tax of 9% should be added to the bill before the tip is determined. Tip is calculated only for the meal cost that does not include taxes. Use a method to read the restaurant charge, calculate the tip amount and display the bill (3 methods in total other than Main).

 

Sample Solution

Computer programming is the process of designing/building an executable computer program to execute a given computation (or, more broadly, to get a specified computing result). Programming entails duties such as analysis, algorithm generation, algorithm accuracy and resource use profiling, and algorithm implementation (usually in a chosen programming language, commonly referred to as coding). [1] [2] Rather than machine code, which is immediately executed by the central processing unit, a program’s source code is written in one or more languages that are understandable by programmers. The goal of programming is to come up with a set of instructions that will automate the completion of a task.

ere are other contingency theories that provide a more continuum based approach such as Redding’s theory of leadership and management, however Fielder’s description of how situational factors affect the leadership style required for the situation is extremely useful in understanding the fundamentals of leadership (Pettinger, 2007). Chelladurai in his Multi Dimensional Model of Leadership, expands on much of Fiedler’s theory but in a continuum based approach, in which the leader can adapt their leadership style to fit the situation (Chelladurai and Madella, 2006). Chelladurai’s theory is taken from sports psychology but can be applied to an organisational scenario. It provides a much more empirical categorisation of task structure, clearly differentiating a plethora of situations that require certain leadership styles for success. Chealldurai found three characteristics that affect the leadership style required for a situation, called antecedents, they mainly expand upon Fiedler’s situational factors and leader – member relations and ultimately affect how a leader should behave towards a situation. The first are situational characteristics, the environment in which the leader must perform, the second are leader characteristics, the experience, personal qualities and skills of the leader, and the third are member characteristics, the motivation, skill and experience levels of group members (Chelladurai and Madella, 2006). The situational characteristics and member characteristics have a required behaviour to ensure maximum group performance, they also have a preferred behaviour to ensure the satisfaction of group members, if the leaders actual behaviour matches both the required behaviour and preferred behaviour of the situation the consequence is maximum group performance and satisfaction. However, if the group are not performing and achieving goals or are not satisfied or both, then the leader is able to amend their actual behaviour to improve this. Leaders able to monitor performance and satisfaction, and understand what is required to amend the situation will achieve optimum group performance in Chelladurai’s model. The one limitation of Chealldurai’s model is that it assumes the leader is in a position of complete positional power over the group, and can implement any leadership style of their choosing without constraints. Positional power is the authority and influence a leader has over a group, if the leader has positional power, they will be able to implement the leadership style they best see fit for the situation. Positional power cannot be measured or quantified, making it highly ambiguous and hard for a leader to understand whether they have it or how then can gain it. It becomes the responsibility of the organisation to have policies in place to provide leaders with some positional power, usually by establishing a clear hierarchal structure. By establishing a hierarchy, the leader is perceived by the group to be able to make demands and expect compliance

This question has been answered.

Get Answer