Explain what is meant by data validation

Assignment Help Basic Computer Science
Reference no: EM131034371

Question 1.1. (TCO 7) (a) Explain what is meant by data validation and discuss why it is important in programming.
(b) What type of control structure is used in data validation? Explain your answer.
(c) A user enters a patient's weight in pounds into a medical application. Describe at least two specific validation checks that should be performed on this input.(Points : 30)      
      

Question 2.2. (TCOs 2 and 4) You have been asked to develop an application to keep track of employees' scheduled vacations and ensure that all vacations are approved by the manager and that each employee does not exceed his or her maximum annual vacation time. Maximum annual vacation time is determined by the number of years the employee has worked for the firm. You are using object-oriented programming (OOP) to develop this application.
(a) Describe at least two classes that you could use in this application and what each class would represent in the real world.
(b) Describe at least two properties of each class you identified in part (a) and identify the data type you would use for each property.
(c) Describe at least one method of each class you identified in part (a), giving for each the method name and the action performed by the method. (Points : 30)      
      

Question 3.3. (TCOs 8, 9, and 10) (a) Explain the value to a business user of storing information entered in an application in a database.
(b) In a two-tier architecture with a fat client and thin server, describe the functions performed by the client and by the server in processing a request by a user for information from a database.
(c) In a Visual Basic application that retrieves data from a database, describe the role of a dataset. (Points : 30)      
      

 

Question 1.

1. (TCOs 1, 2, and 3) You have been asked to develop an application with the following business requirements: The user will enter an order quantity, which must be a whole number, and a unit price, which can have dollars and cents. When the user clicks a Calculate Total button, the application will calculate a total price by multiplying the quantity times the unit price. The application will display the total price to the user.
(a) Develop a TOE chart for this application. You do not need to put it in table form, but list what would go in the Task column, what would go in the Object column, and what would go in the Event column for each row of the chart. Your chart should have at least four rows: two for input, one for processing, and one for output.
(b) Write pseudocode for the button-click event procedure in this application.
(c) Identify three variables that you would declare for this application. For each, provide a variable name that follows the syntax rules of Visual Basic and the Hungarian naming convention, and an appropriate Visual Basic data type. (Points : 30)

 


Question 2.2. (TCO 5) Consider the following Visual Basic code snippet:
            If intScore >= 100 Then
                        lblMessage.Text = "Great job!"
            Else
                        lblMessage.Text = "Better luck next time"
            End If
(a) What type of control structure is this? Be as specific as possible, and justify your answer.
(b) Describe step by step how this code will be executed and what will be displayed to the user  for each of the following values of intScore: 99, 100, and 101. 
(c) Rewrite this code snippet so that it still produces the same results, but changing the condition in the first line from intScore >= 100 to intScore < 100. (Points : 30)      
      

Question 3.

3. (TCO 6) Consider the following code snippet:
            Dim intTotal As Integer = 0
            For  intNum As Integer = 1 To 5
                        intTotal += intNum         
            Next intNum
            MessageBox.Show( intTotal.ToString() )
(a) What type of control structure is this? Be as specific as possible, and explain your answer.
(b) Identify the counter variable and the accumulator variable in this loop. Explain your answer. 
(c) Describe step by step how this code will be executed and what value will be displayed in a message box to the user. (Points : 30)

 

Question 1.1. (TCO 1) In the V-model of the systems development life cycle, _____ testing verifies that the system was designed properly. (Points : 5)
       unit
       usability
       integration
       acceptance

Question 2.2. (TCO 2) To plan the code for a procedure, _____ uses standardized symbols to show the steps the procedure must follow to reach its goal. (Points : 5)
       pseudocode
       a TOE chart
       a class diagram
       a flowchart

Question 3.3. (TCO 3) Computer memory locations where programmers can temporarily store and change data while an application is running are _____. (Points : 5)
       classes
       literals
       constants
       variables

Question 4.4. (TCO 3) In Visual Basic, which of the following assigns the value 42 to the variable intAnswer? (Points : 5)
       Dim intAnswer As 42
       42 => intAnswer
       intAnswer = 42
       42 = intAnswer

Question 5.5. (TCO 5) In an If . . . Then . . . Else statement in Visual Basic, the _____ keyword is needed only in a dual-alternative selection structure. (Points : 5)
       If
       Then
       Else
       Case

Question 6.6. (TCO 5) If intQty contains 60 and decSales contains 100, what will be the value of decBonus after executing the following code?
If intQty > 50 Then
            decBonus = decSales * 0.10
Else
            decBonus = decSales * 0.05
End If (Points : 5)
       0
       5
       6
       10

Question 7.7. (TCO 6) The loop below is classified as a(n) _____ loop.
Dim intNum As Integer = 2
Do 
            MsgBox( intNum.ToString() )
            intNum *= intNum
Loop While intNum < 1000 (Points : 5)
       infinite
       pretest
       posttest
       counter-controlled

Question 8.8. (TCO 6) What is the sequence of values that will be displayed in message boxes by the following code?
For intCounter = 5 To 7 
            MessageBox.Show(intCounter.ToString() )
Next intCounter (Points : 5)
       6
       5, 6
       5, 6, 7
       6, 7

Question 9.9. (TCO 7) Programmers use _____ to avoid duplicating code when different sections of a program need to perform the same task. (Points : 5)
       arrays
       loops
       selection structures
       Sub procedures

Question 10.10. (TCO 7) In the following function, what should go in the blank in the function header?
Private Function GetRatio(dblNumerator As Double, dblDenominator As Double) _____
            Dim dblRatio As Double
            dblRatio = dblNumerator/dblDenominator
            Return dblRatio
End Function (Points : 5)
       ByVal
       ByRef
       As Integer
       As Double

Question 11.11. (TCO 2) An application for a shipping company needs to keep track of the length, width, height, and weight of packages. Using object-oriented programming methods, in this application, the weight of a package would be represented by a(n) _____. (Points : 5)
       object
       attribute
       method
       class

Question 12.12. (TCO 4) (TCO 4) Consider the following class definition:
Public Class Box
            Public Length As Double
            Public Width As Double
            Public Height As Double
            Public Function GetVolume() As Double
                        Return Length * Width * Height
            End Function
End Class
If crate is an instance of Box, which of the following statements invokes a method? (Points : 5)
       crate.Length = 42
       dblVolume = crate.GetVolume()
       crate.Length(42)
       dblLength = crate.Length

Question 13.13. (TCO 8) A(n) _____ specifies the records to select in a dataset and the order in which to arrange the records. (Points : 5)
       aggregate operator
       primary key
       foreign key
       query

Question 14.14. (TCO 9) _____ describes a system's ability to handle increasing amounts of work, which is improved by using a multitier architecture.(Points : 5)

       Maintainability
       Scalability
       Adaptability
       Compatibility

Reference no: EM131034371

Questions Cloud

What is a front end/back end db : What is a front end/back end DB?.
Is there anything else that needs to be done during time : You are a responding psychologist/counselor to a school crisis in which several students were injured through a violent act committed by an offender who was taken into custody by the police. What is your first step when you arrive at the school?
The structure and operation of the fx market : The aim of this assignment is encourage student to search for articles and/or material which will show theory of finance in action. Topic 1: Modern financial system, Topic 6: Foreign Exchange: the structure and operation of the FX market and Topic 7..
Determine the gravimetric analysis of air and its molar mass : Air has the following composition on a mole basis: 21 percent O2, 78 percent N2, and 1 percent Ar.
Explain what is meant by data validation : (TCO 7) (a) Explain what is meant by data validation and discuss why it is important in programming.
What is a dbms : What is a DBMS? Briefly describe the components of a DBMS.Describe a primary key, candidate key, secondary key, foreign key, and a combination key. Use your imagination to provide an example of each key thatis not in the textbook.?
User manage their checkbook : You are to write a program that will help the user manage their checkbook. The program will prompt the user to enter the check number, the date, the name the check is made out to, and the amount until the check number entered is 0. Make sure you use ..
Discuss the right of a corporate network administrator : Discuss the right of a corporate network administrator to use packet sniffers. Are employees' privacy rights being violated?
Describe an algorithm to find the largest : Describe an algorithm to find the largest 1 million numbers in 1 billion numbers  Assume that the computer memory can hold all one billion numbers

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  High-level descriptions of customer-s expectations

It needs to have high-level descriptions of the customer's expectations and the criteria for success. You need to describe why these are the best choices and why alternatives will not work as well.

  What is its numerical value on the big endian machine

If it is transmitted to a big-endian computer byte by byte and stored there, with byte 0 in byte 0, byte 1 in byte 1, and so forth, what is its numerical value on the big endian machine if read as a 32-bit integer?

  Build a responsive mvc mobile first voting application

Build a responsive MVC mobile first voting application. Client should be able to vote for or against one issue

  Identify a recent moral dilemma or ethically questionable

Identify a recent moral dilemma or ethically questionable situation relating to ICT - use the Doing Ethics Technique (DET), ensuring you address each of the DET questions;

  Should sgi develop any new software with derqs

Should SGI develop any new software with DERQS? If not, what tools should it acquire for new system development?

  Vulnerability testing of key and strategic government

You are a new IT security professional for a small police department. At first you did not see your agency as being a large target for attacks. However, the city recently appointed a new and very controversial police chief.

  Declare array, inventory, of components of type partstype

Assume that you have the following definition of a struct. struct partsType { string partName; int partNum; double price; int quantitiesInStock; }; Declare an array, inventory, of 100 components of type partsType.

  How is data reported by exif viewer

How is data reported by EXIF Viewer

  Recommendations for the next steps the merged company

Create a minimum 12 PowerPoint slides to summarize the policy review conducted and your recommendations for the next steps the merged company should take to protect its data and information assets. The cover, summary/conclusion and reference slides a..

  Derive an expression for the aggregate demand curve

b) Derive an expression for the aggregate demand curve. c) We consider two inflation rates to 'pin' down our curves.  Let point A represent conditions where inflation (Π)  = 1% and point B represent conditions where inflation (Π ) = 2%.

  Physical therapy

Looking for Microsoft Office 2013: Advanced Capstone Project 2 BJM Physical Therapy. Willing to pay whatever is needed for it completed. Need before Sunday 4/24. Anything helps, greatly appreciated.

  Identify five different it systems

Identify five different IT systems that have affected business in the past few years. For each system, briefly note the following: · A name for the system

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd