1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
jek_recluse [69]
3 years ago
13

This is your chance to become the instructor. After learning the looping and input validation concepts, create a problem to give

to your students to allow them to practice the looping and input validation concepts. The problem should include at least two different decision structures and a loop. The number of times to process the loop is stated in the problem definition. The decision structures should be chosen from the simple, combined, nested and CASE structures. Use the Programming Exercise problems at the end of Chapter 5 as an example.
The problem description should include:

The input into the problem.

The output from the problem.

The generic processing necessary to solve the problem. (do not give too much information away).

The solution should include:

Input validation statements

The solution should include the exact calculations need to solve the problem.

The solution cannot be similar to a problem posted by another student, located on the Internet or located in another textbook.

pseudocode, in while loop
Computers and Technology
1 answer:
enot [183]3 years ago
4 0

Answer:

See Explaination

Explanation:

The Problem information is as follows:

The input: A data file containing the bank account information.Accounts are of different

types (like Savings Account, Checking Accounts).

The Output: Report on Number of Savings Account, Number of Checking accounts and their

total balances, avregae balance, maximum and minimum balance etc

Processing:

Read the file data

Consider valid account data

Separate different accounts

Calculate the sum of their balances

Calculate the average balnace for each type of account

Display the information

Solution:

1.The application should be able to read the csv file.

2.All the error checking should be done as per defined rules

3.The report should be generated in the defined format

4.Data display precisions need to be followed.

5.Interactive errors should be reported with proper messages

6.Integrity of the data should be maintaied while saving the data.

7. Calculation of the averageAccountBalance = (Sum of all the balances of a particular type of account)/(number of that type of account)

8. TotalAccountBalance = Sum of all the balances of each type of account.

9. To find maximum start with a default value and then traverse all the accounts and update the maximum value as per the comparison results

and same for minimum.

Input Validation:

1.Check for the filename (maximum length is 10 chars besides the csv extension)

2.account number (12 digits, first three entries are alphabets)

3.Name (Only alphabets are allowed)

4.Phone Number (7 digits must follow the format xxx-xxx-x)

pesudoCode:

Input filename

open the file

declare accounts[] array

Read the data in accounts and update numOfAccounts

declare numOfAccounts, numOfSavingActs, numOfCheckingActs, totalBalanceSavings, totalBalanceChecking, averageBalanceChecking

averageBalanceSavings, maximumSaavings, minimumSavings, maximumChecking, minimumChecking

for i = 1 to n:

if (Validate(account[i])):

if account[i].type == "Savings":

numOfSavingActs++

totalBalanceSavings = totalBalanceSavings + account[i].balance

if account[i].balance > maximumSavings:

maximumSavings = account[i].balance

if account[i].balance < minimumSavings:

minimumSavings = account[i].balance

if account[i].type == "Checkings":

numOfSavingActs++

totalBalanceSavings = totalBalanceSavings + account[i].balance

if account[i].balance > maximumSavings:

maximumSavings = account[i].balance

if account[i].balance < minimumSavings:

minimumSavings = account[i].balance

Display(Data)

You might be interested in
Memory: 5 bit addresses Cache: 8 blocks All memory locations contain valid data If the memory location is 15. What is the Binary
VMariaS [17]

Answer:

see explaination

Explanation:

If the cache contains 2k blocks, then the data at memory address i would go to cache block index ( i mod 2k )

Memory address = 5 bit

Cache block = 23

So, if the memory location is 9, then binary address = 01001 and cache block = 9 % 8 = 1 = 001

if the memory location is 12, then binary address = 01100 and cache block = 12 % 8 = 4 = 100

if the memory location is 15, then binary address = 01111 and cache block = 15 % 8 = 7 = 111

6 0
3 years ago
A total stranger is trolling jack online. He’s offended and annoyed. How can Jack stop the troll in his or her tracks ?
coldgirl [10]
A troll's main goal is to provoke a reaction from people, so I'd say the best way to stop the troll in his or her tracks would be to log off and not give the troll any satisfaction.

Then again, the troll might see you logging off as a win because he or she made you rage quit, so maybe replying with a quick "no u" to troll the troll before logging off would throw them off. That being said, the long term solution would still be not responding at all. After a while of no reactions the troll would most likely get bored.
8 0
3 years ago
Read 2 more answers
How do the following technologies help you with your quest to become a digital citizen kiosks enterprise computing, natural lang
Dafna11 [192]

Answer:

How could be an individual become a digital citizens?

Skills such as self-advocacy, conflict resolution, anger management, and decision-making skills, as well as the ability to use assertiveness, resistance, and refusal techniques, are also included and can help students respond safely and effectively online

Explanation:

SAlamat po pa rate nalang

5 0
2 years ago
How many schools are there total at Gaineseville tx
Ahat [919]
There are ten schools total

7 0
3 years ago
Read 2 more answers
What is the name of the contextual or specific tab that appears in page layout view when adding a header
LenaWriter [7]

Answer:

Design.

Explanation:

I'm smart. That's why.

7 0
3 years ago
Other questions:
  • Regional culture has been affected by technology in these ways. Select all that apply. decreased educational opportunities impro
    9·2 answers
  • A production house needs an operating system that captures, saves, and generates information within specific time. Which type of
    13·2 answers
  • 1. How fast do human beings walk?
    15·2 answers
  • Suppose your name was George Gershwin. Write a complete program that would print your last name, followed by a comma, followed b
    11·2 answers
  • Which of the following is a negative impact of technology on society
    9·1 answer
  • Which of the following keys open the spelling and Grammer dialog box
    6·1 answer
  • Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memo
    5·2 answers
  • How can ICT be a tool in connecting all stakeholders in your community?
    5·1 answer
  • How do we benefit from this increased interconnectivity?
    6·1 answer
  • How could this code be simplified?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!