Complete the following tasks for the trial program. 1. Display your full name. 2. Display your...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with four decimal digits in a range of 0000 to 2500. The digits signify energy consumed in a certain month in kWh. 4. Calculate the charges according to the following tariff rate: Tariff Category First 1000 kWh 1001kWh and beyond Rate RM0.01/kWh RMO.20/kWh 5. Display the bill amount. EXAMPLE 1 emulator screen (659 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 1500 Bill amount : RM110.00 change fort Calculation: Bill amount = 1000 (1 cent) + 500 (20 cents) = 11000 cents = RM110.00 EXAMPLE 2 emulator screen (63x7 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 2041 Bill amount: RM218. 20 clear screen change tort Calculation: Bill amount = 1000 (1 cent) + 1041 (20 cents) = 21820 cents = RM218.20 EXAMPLE 3 Bemulator screen (638 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 0385 Bill amount : RM3.85 change font clea screen Calculation: Bill amount = 385 (1 cent) = 385 cents = RM3.85 Additional material: Following is a code snippet to perform hexadecimal to decimal conversion and store the result in ASCII. You may use / modify it or use your own code. MOV AX. 1500 : 1500 - SDCH Hex to decimal Store in memory in ASCII format MOV CX.8 MOV DI.200H offset for menory location Initialize start of memorY location nitialize divider to perfore hex to dec conversion Quot ient= A8i, Remainder = DX Convertie ASCII format Save ASCII code in memory CONT: OR 30H CMP AX.2. INIS Check If quot ient is zero iEnsure DX-0 for the next iteration JAP CONT FINISH: A screenshot halfway through first iteration: Final memory content: Tandom A ary tabe wpdate 0709: 9299 0051 TITI ASCII Character Нех ASCII Character Нех 30 35 1 31 6. 36 2 32 37 33 8. 38 4 34 6. 39 Complete the following tasks for the trial program. 1. Display your full name. 2. Display your MMU student ID. 3. Allow user input with four decimal digits in a range of 0000 to 2500. The digits signify energy consumed in a certain month in kWh. 4. Calculate the charges according to the following tariff rate: Tariff Category First 1000 kWh 1001kWh and beyond Rate RM0.01/kWh RMO.20/kWh 5. Display the bill amount. EXAMPLE 1 emulator screen (659 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 1500 Bill amount : RM110.00 change fort Calculation: Bill amount = 1000 (1 cent) + 500 (20 cents) = 11000 cents = RM110.00 EXAMPLE 2 emulator screen (63x7 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 2041 Bill amount: RM218. 20 clear screen change tort Calculation: Bill amount = 1000 (1 cent) + 1041 (20 cents) = 21820 cents = RM218.20 EXAMPLE 3 Bemulator screen (638 chars) Name: John Smith Student ID: 12345678 Energy usage in khh (enter decimal digits 0000 to 2500): 0385 Bill amount : RM3.85 change font clea screen Calculation: Bill amount = 385 (1 cent) = 385 cents = RM3.85 Additional material: Following is a code snippet to perform hexadecimal to decimal conversion and store the result in ASCII. You may use / modify it or use your own code. MOV AX. 1500 : 1500 - SDCH Hex to decimal Store in memory in ASCII format MOV CX.8 MOV DI.200H offset for menory location Initialize start of memorY location nitialize divider to perfore hex to dec conversion Quot ient= A8i, Remainder = DX Convertie ASCII format Save ASCII code in memory CONT: OR 30H CMP AX.2. INIS Check If quot ient is zero iEnsure DX-0 for the next iteration JAP CONT FINISH: A screenshot halfway through first iteration: Final memory content: Tandom A ary tabe wpdate 0709: 9299 0051 TITI ASCII Character Нех ASCII Character Нех 30 35 1 31 6. 36 2 32 37 33 8. 38 4 34 6. 39
Expert Answer:
Answer rating: 100% (QA)
PART A and PART B Both these parts basically require a string being printed so they have been ma... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
In the California Daily 4 lottery, four digits are randomly selected each day. Listed below are the digits that were selected in one recent week. Construct a dotplot. Does the dotplot suggest that...
-
A student has 3 math books, 4 history books, 2 chemistry books, and 1 Latin book. He wants to arrange them on a bookshelf a. If all the books have different titles, in how many distinct ways can he...
-
A 70-kg astronaut floating in space in a 1l0-kg MMU (manned maneuvering unit) experiences an acceleration of 0.029 m/s2 when he fires one of the MMU's thrusters. (a) If the speed of the escaping N2...
-
Write a static method lg() that takes an int argument n and returns the largest integer not larger than the base-2 logarithm of n. Do not use the Math library.
-
Discuss why IPOs appear to generate abnormal returns for investors. Are these returns a "sure thing"? What are the economic implications of these high returns for IPO issuers?
-
Why is information technology important for successful change management?
-
Determine the maximum axial force P that can be applied to the plate. The allowable stress is allow = 36 ksi. P 0.5 in. 0.54 in. P 0.45 in. 4.5 in. 3 in, 0.45 in.
-
Telecom manufactures electronic components for computers. One measure it uses to monitor the quality of its distribution process is the number of customer invoice errors. The distribution center...
-
Based on the textbook "Abnormal Psychology" by Gelzfeld, second edition, define abnormal psychology.
-
Create a new What SUP Operating Cash Payments Budget Using the ch6-03 file to start your work, create a worksheet similar to the one created in this chapter to budget operating cash payments by month...
-
Focus on the characters of the protagonists of the stories assigned for this week: The narrator of "Cathedral" Delia in "Sweat" How would describe each character as a person? What are his or her main...
-
How has China's current position in the South China Sea affected globalization, and what is the long-term outlook for the region?
-
25. What is the primary defect in chronic granulomatous disease (CGD)that leads to increased susceptibility to infection? A) Deficiency of NADPH oxidase enzyme B) Decreased respiratory burst in...
-
Strategies used to hedge against the foreign exchange between the currencies of different countries and the commodity prices' volatility. Assess how derivatives can be used in such a situation and...
-
Assume that consumers consume ice cream and cake together. How will a decrease in cake prices affect the equilibrium in the ice cream market? Explain.
-
What role does econometric evidence play in FTC v. Staples? Do you think this case is decided differently absent any econometric evidence?
-
Solve 4r+12 5r-15 00 8 5 The solution isr (Simplify your answer)
-
Problem 2. (0.6 points, 0.2 points for each question) (a) A company turns its inventory 2 times a month. Its months-of-supply = Its days-of-supply = Please show your analysis below: _months. days. (1...
-
In a survey, 1004 adults were asked to identify the most frustrating sound that they hear in a day. In response 279 chose jackhammers, 388 chose car alarms, 128 chose barking dogs, and 209 chose...
-
In Maines Pick 4 lottery game, you can pay $1 to select a sequence of four digits, such as 1332. If you select the same sequence of four digits that are drawn, you win and collect $5000. a. How many...
-
In a study of 420,095 Danish cell phone users, 135 subjects developed cancer of the brain or nervous system. Test the claim of a somewhat common belief that such cancers are affected by cell phone...
-
You are the product manager of Lexcon Fitness and are considering the production of new elliptical trainers. You feel you can sell 5,500 of these per year for 6 years (after which time this project...
-
At present, Global Skateboards Limited is considering expanding its product line to include solar powered skateboards; however, it is questionable how well they will be received by skateboarders....
-
Assume that Fiskars Finland plans to invest in a new project that will annually generate revenues of \($2.3\) million. Cash expenses including both fixed and variable costs will be \($950,000,\) and...
Study smarter with the SolutionInn App