1. Create a method named getOperands. This method does not return a value. In th
ID: 3691550 • Letter: 1
Question
1. Create a method named getOperands. This method does not return a value. In this method, prompt the user twice. At the first prompt, ask them to enter a double variable. Name it operand1. At the second prompt, ask them to enter another double variable. Name it operand2. Use suitable data validation to ensure the variables receive a double value. Another data validation is that operand1 and operand 2 use a positive value of at least 2.00 and less than 40.00. Another data validation is that operand1 is less than or equal to the value in operand2. Keep prompting the user, if necessary, until all data validations are passed.
2. Now that data validations have been enforced, from getOperands, pass both double variables to a method named calcPercentage. This method does not return a value. It should display the first received value (i.e. operand1's value) as a percentage of the second received value (i.e. operand2's value). For example, if the method receives numbers of 2.0 and 5.0, the method should output the following to the command line: "The value of 2.0 is X percent of 5.0." where X is the percentage.
3. Use method overloading by creating three methods, each named buildName. The first version of buildName should accept two String values named nameFirst and nameLast. These are assigned by you in the main method; no user input is needed. The method should return a String of the name parts in reverse order, separated by a comma and space. For example, if the first version of buildName receives "Santa" and "Claus", it should return the following value: "The full name reversed is: Claus, Santa"
4. The second version of buildName should accept a String value named nameFirst, a character value named nameMI, and a String value named nameLast. These are assigned by you in the main method; no user input is needed. The method should return a String of the name parts in reverse order, separated by a comma and space. Append a period for the middle initial. For example, if the second version of buildName receives "Santa", "Q", and "Claus", it should return the following value: "The full name reversed is: Claus, Santa Q."
5. The third version of buildName should accept a String value named nameFirst, a character value named nameMI, a String value named nameLast, and an integer representing an age. These are assigned by you in the main method; no user input is needed. The method should return a String of the name and age parts in reverse order, separated by a comma and space. Append a period for the middle initial and include the age. For example, if the third version of buildName receives "Santa", "Q", "Claus", and 42, it should return the following value: "The full name reversed and age are: Claus, Santa Q. (42 years old)"
6. Call each of the methods above from the main method. The pseudocode for the main method will be as given below.
Get the operands and ensure data validations are passed
Calculate the percentage of the operands
Output the reversed full name and age, depending on the values being provided
Explanation / Answer
ANS;
MING’S PASTRY SHOP
Business model for Ming’s pastry shop
The best business model for Ming is sole trader because Ming wants to use his accumulated savings to open his own pastry shop where he could market his own unique brand products freely.
Sole trader
A sole trader is a person in a business who is personally responsible for the debts and the liabilities of that business and also it is only one person who owns that business. Thus, Ming can be said to fit in this model of sole trader because he wants to open his own pastry shop where he could sell his unique products with freedom.
Advantages of sole trader
Disadvantages of sole trader
Naming of a business is a very important branding exercise. Since Ming wants to operate his business under a name other than his own name, there are appropriate steps that he has to follow for him to be able to operate using that name. This steps include;
Ming will be required to register the name he wants with the appropriate authorities. This process of registration is referred to as registering your “Doing Business As” (DBA) name. This I done with the sole trader’s county clerk office or with the state government of the sole trader depending on the location where the business is situated. However there are also depending on states there are other that do not require registration of fictious business names but other states require registration of these fictious.
The best business model that will accommodate the idea of Ming being financed half of the capital by his employer is called partnership.
This model best fits in Ming’s employer investing half of the capital of the business since partnership involves relation between two or more persons who come together and join hands to form a business organisation whose main objective is earing profit.it provides the nccesary capital and includes running the business jointly and sharing of the business responsibilities.
Advantages of partnership
Disadvantages of partnership
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.