Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Design Tools (Pseudocode)

Instruction: Create a program plan, algorithm, flowchart and pseudocode for the following cases:

               A Department Store classifies its credit card holders as to local, national and international. A local card holder resides in Metro Manila, a national, anywhere in the Philippines and an international, anywhere in the world. The programmer must store a code 01, 02, and 03 for local, national and international card holders respectively. The program is to read the cards and store the proper code in each card.


Flowcharting (Iteration Structure)

An electric company bases its charges on two rates, customers are charged P25.00 per kilowatt-hour for the first 300 kilowatt-hours used in a month and P30.00 each for all kilowatt-hours used thereafter. Compute for the amount due from a customer after reading the kilowatt-hours used. Assume that there are 100 records of customers.


Flowcharting (Iteration Structure)

Write an algorithm and draw a flowchart that will convert a given decimal number (N10) to its equivalent binary number (N2).


Flowcharting (Selection Structure)

A company classifies its products by weights as follows:

               Class A – 12 pound or over

               Class B – 5 to 11.9 pounds

               Class C – less than 5 pounds


Show the logic of determining into which class to place an item.


Given is GROSS_PAY, draw a flowchart that will compute for DEDUCTIONS and NET_PAY for employee’s weekly payroll. Consider the conditions:

               If Civil Status = ‘SINGLE’

                               DEDUCTIONS = GROSS_PAY * 0.03

If Civil Status = ‘MARRIED’

                               DEDUCTIONS = GROSS_PAY * 0.06

If Civil Status = ‘WIDOW’

                               DEDUCTIONS = GROSS_PAY * 0.05

               If Civil Status = ‘HEAD OF THE FAMILY’

                               DEDUCTIONS = GROSS_PAY * 0.02


Using the formula:

[NET_PAY = GROSS_PAY – DEDUCTIONS]

Create a program plan, an algorithm, and draw a flowchart that uses sequence structure, that would accept two (2) numbers represented by X and Y. Print the two number after interchanging their values.


Provide a method applyDiscount(double disc) that calculates the price, applies the discount % given in the argument and returns the discounted price of the sandwich.E.g. if the method is called on a sandwich whose real price returned by the calculatePrice function is 550 and applyDiscount(10) is called, then a ten percent discount will be calculated as 550 * 10/100 = 55. Now this function will return the discounted price as 550 – 55 = 495. (Please note that this is just an example, do not hard code these values in your function). 8. Provide the toString method that returns a well formatted string showing the detailed composition of the sandwich e.g. Bread Slices : 2 Cheese Slices : 2 Patties: 1 Tomato Slices: 0 Mustard: No (if not added) Ketchup: Yes Iceberg : Yes Grilled: No Price: Rs. 200 (dummy value given here but you will calculate programmatically and provide correct value here) 


A parameterized constructor taking 4 arguments for bread slices, cheese slices, meat patty number and tomato slices. The values of the rest of the variables will be initialized by default to true 2. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 3. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 4. Provide setters for mustard, ketchup, iceberg and gilled 5. Provide getters for each of these variables 6. Provide a method calculatePrice() that calculates and returns the price of this sandwich according to the rates given in the above table. E.g. the price of a sandwich with 3 bread slices, 2 cheese slices, 2 tomato slices, 3 patties, mustard, no ketchup, no ice berg with grilling will be calculated as 3 * 20 + 2 * 30 + 2 * 5 + 3 * 70 + 5+ 0 + 0 + 10  


Consider a class representing a ClubSandwich. A sandwich is made of some number of bread slices, cheese slices, meat patties and tomato slices. The club sandwich might also contain (or not) mustard, ketchup, iceburg. The sandwich may or may not be grilled. Different composition of the sandwich will cost different prices according to what it contains A sample of the class is given on moellim. You can use the same file and provide the missing things. You are required to provide the following 1. A parameterized constructor taking 4 arguments for bread slices, cheese slices, meat patty number and tomato slices. The values of the rest of the variables will be initialized by default to true 2. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 3. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 4. Provide setters for mustard, ketchup, iceberg and gilled


Using a for loop, write a programme that prints all values between 20 and 24. Then using an if-else statement and the modulus operator, modify your program to add the word "odd" or "even" to each value to show if it is odd or even.


Expected Output:


20-even


21-odd


22-even


23-odd


24-even


LATEST TUTORIALS
APPROVED BY CLIENTS