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
Your friend sends you a computer game. after installing the game on your computer, you realize that it plays very slowly. you kn
dsp73
Memory possibly. Or another pricessor.
8 0
3 years ago
.true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
ser-zykov [4K]

Answer:

true

Explanation:

cloudware is used for many reasons and It is sometimes too much of an expense to the company

7 0
2 years ago
Which of the following is an example of a syntax error?
Yuri [45]

Answer:

misspelling a programming language word

Explanation:

Syntax error is the type of error in programming, when the programmer insert some symbol that is not present in directories or libraries, the programmer not followed the rules of that particular programming language that is understandable to compiler.

For example in C++, it is necessary to insert the semicolon (;) after each statement. If the programmer not insert the semicolon after each statement, the program will show the syntax error.

If the programmer use integer instead of int to assign datatype to the variable in C++, it will also leads to the syntax error. Because in C++ library, Integer is defined with the help of "int".

4 0
2 years ago
I want to work with LDAP. what is LDAP?
pychu [463]
It's an internet protocol (Lightweight Directory Access Protocol) used to fetch data from servers.
5 0
3 years ago
Read 2 more answers
The assignment operator has left-to-right-to-left associativity, which means that the value of the expression to the left of the
postnew [5]

Answer:

The given statement is false statement.

Explanation .

  • The assignment is assigning the value to the variable or we can say that it will also be used to initialize the variable The "=" is the symbol of the assignment operator.
  • For example

        int r=90, The value of variable 90 is assigned to 90.

  • The associativity, of assignment, is always right to left which means The right-hand side is firstly evaluated then it will be assigned in left-hand side variable or expression.  

4 0
3 years ago
Other questions:
  • What should be included in the closing portion of your letter or e-mail?
    12·2 answers
  • What keyword do we use when instantiating an object _________________
    15·1 answer
  • Many software makers provide free downloadable updates, sometimes called a(n) ______ to users who have registered and/or activat
    5·1 answer
  • Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j
    11·1 answer
  • Vhich economic impact of computers was mentioned in this lesson?
    6·1 answer
  • Explain the major innavotions made from the establishment of abacus​
    8·1 answer
  • Jon wants to assign a value to the favorite food variable: favoriteFood! = "Pizza" but gets an error message. What does he need
    9·2 answers
  • Which of the following is the best way to keep up with trends in your industry?
    8·1 answer
  • 1. Write the full forms of the following.
    8·2 answers
  • What type of e-mail typically lures users to sites or asks for sensitive information?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!