The Information Systems Department is selling T-shirts. Write an algorithm that Creates an attractive user interface that allows users to select sizes (S, M, L, XL) and quantity. Choose the most appropriate controls. Remember, the fewer keystrokes required of the user the better. Display the selections made by the user with the Process menu option. Include an option to exit the application. Include two more sizes, XSmall and XXLarge. Add statements that process the order by calculating the total cost. Each shirt is $16 except the XSmall and XXLarge; their speciality prices are $20 each Display the total cost of then selection. Include a help option that displays instructions. You can enhance your solution by allowing users to purchase different sizes on the same order.
Write an algorithm that creates a windows application that contains two TextBox objects and two Button objects. One of the TextBox objects and one of the buttons are initially invisible. The first textbox should be used to input a password. The textbox should be masked to some character of your choice so that the characters entered by the user are not seen on the screen. When the user clicks the first button, the second TextBox object and button object should be displayed with a prompt asking the user to reenter his or her password. Now the user clicks the second button, have the application compare the values entered to make sure they are the same. Display an appropriate message indicating whether they are the same.
Write an algorithm for a program that includes an Employee class that can be used to calculate and print the take home pay for a commissioned sales employee. All Employee receives 7% of the total sales. Income tax rate is 18%. Retirement contribution is 10%. Social security tax is 6%. Write instance methods to calculate the commission, income tax and social security tax withholding amounts as well as the amount withheld for retirement. Use appropriate constants. Design an object oriented solution and write constructors. Include at least one mutator and one accessor method; provide properties for the other instance variables. Create a second class to test your design. Allow the user to enter values for the name of the employee and the sales amount for the week in the second class.
Write an algorithm for a program that computes that amount of money a computer club will receive from proceeds of their Magwinya café sales project. The Magwinya are sold in cases that contain a dozen in each case. Allow the user to enter the number of cases sold and the sale price per gwinya. Each case contains 12 magwinya; each case is purchased at R15.00 per case from a local vendor. The computer club is required to give the SRC 10% of their earnings. Display their proceeds formatted with currency. Display instructions to the user about the application. Display all inputs and calculated values. Write appropriate methods for your solution.
What is direct addressing? *
Fewer keys than array positions
Distinct array position for every possible key
Same array position for all keys
Fewer array positions than keys
What is a hash table? *
A structure that maps keys to values
A structure that maps values to keys
A structure used for storage
A structure used to implement stack and queue
Q.1.1 Create a two-dimensional array to contain the three sale items for five different artists. A single array must be used to store the artist names.
ARTIST NAME CD SALES DVD SALES BLU RAY SALES
Ed Sheeran 900 000 800 000 500 000
Pink 700 000 500 000 500 000
Bruno Mars 800 000 100 000 50 000
Foo Fighters 100 000 200 000 200 000
Taylor Swift 300 000 100 000 50 000
Q.1.2 Allow a user to enter in a number, ranging from 1 to 5, which will represent the artist position with regards to the album sales.
Q.1.3 Printout the artist name including the CD, DVD, BLU RAY sales amounts and total sales.
Algorithm addingLargeNumbers()
a create 3 empty stacks of integers (stack1, stack2, & result-stack)
b read numerals (digits) of first no & store nums corresponding to them on stack1
c read numerals (digits) of second no & store nums corresponding to them on stack2
d integer carry = 0
e while at least 1 stack is not empty
i pop a no from each nonempty stack & add them to carry
ii push unit part of sum on result-stack
iii store carry in carry
f push carry on result-stack if it is not zero
g pop numbers from result-stack & display them
Write C++ program for adding 2 very large nums
1 Use Stack class to store integers
2 Program should read 2 numbers from console & store them as 2 strings
Suppose max no of numerals (digits) in a no is 30
3 After reading input determine sum of 2 large numbers by above algorithm & print on console
Input
123456789123456789123456789
123454321123454321123454321
Output
23456789123456789123456789
123454321123454321123454321
246911110246911110246911110
A car advert says the dealer would give anyone a $500 trade in on his old car. The asking price for the car (before trade in) is $4000, they will offer you a 4% interest rate for a 3year loan. What is the amount you need to finance? Use the pmt function to determine your monthly payment. Copy the work and then use the goal seek tool to determine what the asking price of the car before trade in would have to be to make a monthly payment of $70. Present the payment and loan on a bar chart.