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
What is the main function of the motherboard?
djyliett [7]

Answer: The MotherBoard is an essential component or part of a computer. It includes some of the important parts which are CPU, memory, connection of inpit and output devices.

Explanation:

5 0
4 years ago
Submit your 300-word essay describing the equipment usedI in a well-equipped studio’s audio department and the training and expe
strojnjashka [21]

Answer:

Holy I feel bad for you G.

Explanation:

5 0
4 years ago
Read 2 more answers
give the difference between functional and functional tools in the middle of to the circle give importance​
bija089 [108]

Answer:

hakkuna matata is the radious of a circle

5 0
3 years ago
How long is prison time for someone who commits copyright infringement for the first time ?
Murljashka [212]

Answer:

it is up to 5 years

Explanation:

7 0
3 years ago
What is a mechanical gear and how does it work to create more power?
Neko [114]
Its a gear that is not turned manually and it can spin faster and longer than a manual gear.
5 0
3 years ago
Other questions:
  • A ______________ is a document created when planning resource management to help promote teamwork and clarify team communication
    13·1 answer
  • Some personal computer manufacturers provide a hard disk configuration that connects multiple smaller disks into a single unit t
    6·1 answer
  • In a certain computation, 90% of the work is vectorizable. Of the remaining 10%, half is parallelizable for an MIMD machine. Wha
    9·1 answer
  • Malware that is spread through security warnings or advertisements for antivirus software is known as
    5·1 answer
  • Que quiere decir analogico
    6·1 answer
  • How many characters should a strong password have? four six eight ten
    10·2 answers
  • A list contains the following items: Antelope, Baboon, Cheetah, Elephant, Giraffe, Hippo, Jackal, Lion, Okapi, Warthog. ​(a)​A b
    5·2 answers
  • Can someone help me?
    14·1 answer
  • Your development server is experiencing heavy load conditions. Upon investigating, you discover a single program using PID 9563
    5·1 answer
  • HELP GEKP HELP HELP HELP HELP Cassandra is shooting a photo series in very low light. What kind of lens opening will
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!