use for/while loop only to implement a calculator using ++ (increment) and -- (decrement) operators only. The operations that your calculator shall perform are limited, i.e. addition, subtraction, multiplication, division, remainder and absolute. Your program shall ask the user about the two input values and an operator, and then use the switch-case structure to run the required operation (addition, subtraction, multiplication, division or absolute (symbol ~)). Your program shall run correctly for positive input values only. Prototype are: int addition(int n1,int n2); int subtraction(int n1,int n2); int multiplication(int n1,int n2); int division(int num,int denom); int remainder(int num,int denom); int absolute(int num);Take only one input for absolute function.All functions inputs can be positive or negative except remainder function, whichaccept only positive values (>0).Take input and display output in main function.write a program for this problem
The organisation you work for has asked you to create an interactive application that will assist with the allocation of employees to a cell phone network provider and phone number generation. You are required to prompt a user for three employee names which will randomly assign the employee to either the Vodacom, MTN or Cell C network. The employees also require a randomly generated phone number. The start of each phone number will begin with the following, depending on the network provider: NETWORK PROVIDER START Vodacom 072 MTN 083 Cell C 084 The remaining numbers of the phone number must be randomly generated.
Using the hardware given to the right, show the addition of two numbers in steps as it would take
place.
A= 0.000125
B= 0.0125
Show the steps in detail. Also show the contents of different registers (R1, .. R6) and control bits (C1,
.. C5). It is noted that Control bits (C1, .. C5) could be either 1 or 0 and you can assign the logic levels
for particular operations.
You can present your answer preferably in a table
“Gola Ganda” shop, Gola Gandas of all shapes and sizes. Gola gandas of three sizes: Small, Medium and Large.
A customer can add as many toppings on it as they want, the toppings could be more “Sauce”, Condensed Milk, Nutella, etc . Every topping has a different cost, and the cost of each topping will be added on top of the cost of the size of gola ganda.
if a small gola ganda cost, 50 rupees, and a topping of condensed milk cost 10 rupees, and a topping of Nutella cost 20 rupees, and if a customer has ordered a small gola ganda with condensed milk and Nutella then the total cost will be 80 rupees (50 for small gola ganda, 10 for condensed milk, and 20 for Nutella).
Your job is to design a system that can calculate the final cost of the gola ganda.
task is the following:
• Identify the design pattern that can be used over here
• Justify your choice
• Make a class diagram (using UML Notation)
• Implement the classes in JAVA
• Test your implementation
The Air Force has asked you to write a program to label aircrafts as military or civilian. Your program input is the plane's speed and its estimated length. For planes traveling faster than 1100 km/hr, you will label those shorter than 52 m “military", and longer as “Civilian". For planes traveling less than 1100, you will issue an “aircraft unknown" statement.
Using www.bbc.com website,
discuss how the below languages could be used in the site with 2 examples.
1.HTML
2.CSS
3.JavaScript
4.JSON
Suppose you are employed by a advertisement agency to design a system to send advertisements in different languages and to different modes such as sms, email, in-mail, cable-tv, etc. (more can be added later or).
The process of sending an advertisement is always the same irrespective of the language or the mode of the advertisement. The process is as follows:
1. The text of the advertisement is received as text
2. The text is then translated into a desired language.
3. The translation depends upon the mode of advertisement
4. The translated text is then proof-read for consistency
5. And then the text is advertised on the required mode
Your task is the following:
• Identify the design pattern that can be used over here
• Justify your choice
• Make a class diagram (using UML Notation)
• Implement the classes in JAVA
• Test your implementation
Write a program that Ask to user input id and password If the Password and id is right than it has to show that you're successfully logged in!
if the passwords is wrong than it has to show the following message log in failed try again, also give 5 chances to log in and the password is still wrong than it has to show the message at 6 attempt that Your Attempts are expired try again after 60 seconds and program will be terminated
Question 1
Write SQL command to create the SALARY table having the following columns and their constraints. You are required to choose the appropriate data type for each column by your own.
Column Name Data Type Data Type
Month - -
Basic-salary - NOT NULL
House-allow - NOT NULL
Medical-allow - NOT NULL
Total-salary - DEFAULT 500
Income-tax - UNIQUE
Net-salary - NOT NULL
EmpID - -
Question 2
Write the following SQL commands for the SALARAY table created in question 1.
⦁ Add the primary key constraint on Month & EmpID columns using ALTER command.
⦁ Add the foreign key constraint on EmpID column using ALTER command.
Note: EmpID is a primary key column in Employee table.
Given a sentence S, write a program to print the frequency of each word in S, where words are sorted in alphabetical order.