Development Of A Student Payment System Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Earlier than getting into sketch the diagram we want to build up the essential pseudo code for the specified question. If not it will be hard to find the components in functional list as well as condition list. Before sketch pseudo code we need to spot the entities that are going to participates. So they are,

StudentNo

Stu-Name

CourseFee

Paid

Balance

This is the pseudo code for the student payment system

Begin

Open the file

Read a record

Count=0 While Not EOF

If due>0 then

Print StudentNo, StName, Balance

Count=count+1

End if

Read a record

Display count

End

This is the example for the pseudo code. Here I have used Count to Count the number of students those who have outstanding balance for the course. With the help of this pseudo code following table is produced

Functional List

Condition List

Start

While NOT EOF

Open the file

{

Read a record

(1) if due>0 then

Count=0

{(5), (6)}

Print StudentNo, StuName, Balance

(3)

Count=count + 1

}

Display Count

Stop

This a functional and condition list table for the above mentioned scene. Under functions list refer what are the functions happened in the particular system. Condition list refer to finish the process what are the condition is going to use for the particular system.

With the help of the pseudo code and functional and condition list table we can create the structure diagram for the above mentioned scene.

STRUCTURE DIAGRAM FOR THE STUDENT PAYMENT SYSTEM



*

Begin

Body

End

Main

Main

Begin Body End

(1),(2),(3),(4) (1) (7),(8)

While



(3),(4),

IF(1)



(6),(5)

Structure Diagram(1.1)

This is the structure diagram for the student payment system. Here the structure contains main 4 parts. Those are Main, begin, body, and end.

Main: - Initiation of structure diagram

Begin: - It's refers what are the functions begin the process.

Body: - Conditions parts are coming under here.

End: - If the process finishes it will show the results

Task 1.2

i )

Pseudo codes for student marks system

Begin

Open the file

Read a record

While Not EOF

If marks ≥ 80

Displays "Distinction"

Else

if marks ≥ 60

Display "Credit"

Else

if marks ≥40

Display "Pass"

Else

Display "Fail"

End if

End if

End if

Read a record

End While

End

This is the pseudo code for the student marks system. First if condition gives the command for the system if mark is higher than 80 the grading should be Distinction. The second if statement refers if the mark is higher than 60 and lower than 80, the grading will be Credit. The third if statement refers if the mark is higher than 40 and lower than 60 is coming under grading call Pass. The final condition else refers balance marks are coming under Fail grading.

With the help of pseudo code we are going to create flow chart. Following sub task contain the flow chart for the student mark system

(ii)Flow Chart

Functions are draw by the order. When conditions symbols comes it will create two ways either it can be true or fall. If it's true the process is finish. If it's falls the rest of the condition may satisfy. When it's satisfying the condition process will be finish. Following is the flow chart for student marks system

if student marks ≥ 60

if Student marks ≥40

Display "fail"

Read the record

Display

"Pass"

Open the file

Read the record

While end of file

If Student marks ≥ 80

Close file

Yes

Yes

Yes

Exit

Credit

Display

"credit"

Display

"Distinction"

No

No

Yes

No

No

Task 1.3( Use case diagram)

Use case diagram

This following task we need to identify the actors those who are going to participate in the process. Followings are the terms use under the use case diagram

Actors: - they are the participants who create the process.

Box: - Box is a scope of the system which refers the system boundaries and limitations.

Sequence: - Sequence is the process details which goings to happen amongst the actors

Order System

Enquiry

Order

Client

Confirm order

Sales man

Payment

Issue invoice

Account clerk

Descriptions

Client : Place an order with sales person

Account clerk : when order confirmed he or she issue the invoice to the client

Sales man : Answer client enquiry and accept the order

Enquiry : Its made about the product by client to sales person

Order : Its made by client with the sales person

Confirm order : Its made by sales person with client and account clerk

Issue Invoice : Its produce by account clerk and issue to the client

Task 2.1(Benefits of documentation)

To achieve goals

Effective management requires the process being managed to be visible. Because software is intangible and the software process involves apparently similar cognitive tasks rather than obviously different physical tasks, the only way this visibility can be achieved is through the use of process documentation.

Process documentation falls into a number of categories:

Plans, estimates and schedules these are documents produced by managers which are used to predict and to control the software process.

Reports these are documents which report how resources were used during the process of development.

Standards these are documents which set out how the process is to be implemented. These may be developed from organizational, national or international standards.

Working papers these are often the principal technical communication documents in a project. They record the ideas and thoughts of the engineers working on the project are interim versions of product documentation, describe implementation strategies and set out problems which have been identified. They often, implicitly, record the rationale for design decisions.

Improve Communication

Memos and electronic mail messages these record the details of everyday communications between managers and development engineers. The major characteristic of process documentation is that most of it becomes outdated. Plans may be drawn up on a weekly, fortnightly or monthly basis. Progress will normally be reported weekly. Memos record thoughts, ideas and intentions which change. Although of interest to software historians, much of this process information is of little real use after it has gone out of date and there is not normally a need to preserve it after the system has been delivered. However, there are some process documents that can be useful as the software evolves in response to new requirements. For example, test schedules are of value during software evolution as they act as a basis for re-planning the validation of system changes. Working papers which explain the reasons behind design decisions (design rationale) are also potentially valuable as they discuss design options and choices made. Access to this information helps avoid making changes which conflict with these original decisions. Ideally, of course, the design rationale should be extracted from the working papers and separately maintained. Unfortunately this hardly ever happens.

Accountability

Documentation demonstrates accountability by:

-Identifying the care provider;

-Determining responsibility; and

-Contributing to legal proceedings.

Accountability answers the question, who did what and when? Documentation demonstrates a nurse's accountability and determines responsibility. It also resolves questions or concerns about the provision of

care. A user's documentation may be used in a legal proceeding, such as a lawsuit, coroner's inquest or a discipline hearing at the College.

To support end users

Users of a system are not all the same. The producer of documentation must structure it to cater for different user tasks and different levels of expertise and experience. It is particularly important to distinguish between end-users and system administrators:

1. End-users use the software to assist with some task. This may be flying an aircraft, managing insurance policies, writing a book, etc. They want to know how the software can help them. They are not interested

in computer or administration details.

2. System administrators are responsible for managing the software used by end-users. This may involve acting as an operator if the system is a large mainframe system, as a network manager is the system involves a network of workstations or as a technical guru who fixes end-users software problems and who liaises between users and the software supplier. To cater for these different classes of user and different levels of user expertise, there are at least 5 documents (or perhaps chapters in a single document) which should be delivered with the software system

2.2

Jackson Structured Programming

Jackson Structured Programming or JSP is a method for structured programming based on correspondences between data stream structure and program structure. The method is closely related in concept to creating a parser for a regular expression that describes the data stream structure, but tries to build a program structure that matches more than one data stream and provides guidance and techniques to compensate the limited look ahead and the clashes between the structures of the different data streams.

JSP was originally developed in the 1970s by IT consultant Michael A. Jackson and documented in his 1975 book Principles of Program Design. Jackson's aim was to improve the general standard of COBOL programming, but the method is still useful when coding with modern programming languages such as C and Perl. And while JSP was originally geared towards writing batch-style file processing programs, its principles are still useful when programming in the small, below the level where object-oriented methods become important.

As a method of programming, JSP is more straightforward than other structured methods, avoiding the leaps of intuition needed to successfully program using, say, top-down decomposition. And although it imposes a structure upon a program which improves its modifiability and maintainability, the structure is rather different from the type of structure advocated by Wirth, Dijkstra, et al.

The method

JSP uses semi-formal steps to capture the existing structure of a program's inputs and outputs in the structure of the program itself.

The intent is to create programs which are easy to modify over their lifetime. Jackson's major insight was that requirement changes are usually minor tweaks to the existing structures. For a program constructed using JSP, the inputs, the outputs, and the internal structures of the program all match, so small changes to the inputs and outputs should translate into small changes to the program.

JSP structures programs in terms of four component types:

* fundamental operations

* Sequences

* Iterations

* selections

The method begins by describing a program's inputs in terms of the four fundamental component types. It then goes on to describe the program's outputs in the same way. Each input and output is modeled as a separate Data Structure Diagram (DSD). To make JSP work for compute-intensive applications, such as digital signal processing (DSP) it is also necessary to draw algorithm structure diagrams -- something not envisioned by Jackson himself.

The input and output structures are then unified or merged into a final program structure, known as a Program Structure Diagram (PSD). This step may involve the addition of a small amount of high level control structure to marry up the inputs and outputs. Some programs process all the input before doing any output, whilst others read in one record, write one record and iterate. Such approaches have to be captured in the PSD.

The PSD, which is language neutral, is then implemented in a programming language. JSP is geared towards procedural languages which are not OO, such as Fortran, Pascal, Cobol, PL/1 and C. To a large degree JSP is not helpful for OO languages and declarative languages.

JSP uses a diagramming notation to describe the structure of inputs, outputs and programs, with diagram elements for each of the fundamental component types.

A simple operation is drawn as a box.

A box labeled 'A'

An operation

Sequence

A sequence of operations is represented by boxes connected with lines. In the example below, operation A consists of the sequence of operations B, C and D.

A box labeled 'A' connected to three boxes below it labeled 'B', 'C' and 'D'

A sequence

Iterations

An iteration is again represented with joined boxes. In addition the iterated operation has a star in the top right corner of its box. In the example below, operation A consists of an iteration of zero or more invocations of operation B.

A box labeled 'A' connected to a box labeled 'B' below it with a star in the top right corner

Iteration

Selection

Selection is similar to a sequence, but with a circle drawn in the top right hand corner of each optional operation. In the example, operation A consists of one and only one of operations B, C or D.

A box labeled 'A' connected to three boxes below it labeled 'B', 'C' and 'D' each with a circle in the top right hand corner

A selection

2.3

(i)

The purpose of the compiler is to translate the programs written in human readable language to machine language which is understandable to computer machine. A compiler reads instruction in the programs and translates it, if there is any error it also identify it and warns about it to user. The error could be typing mistake (syntax error) or a logical error. when all the erros are removed the instructions are sent to the computer for processing

For performing different task on the computer, a compiler is communication medium that translate source language into target language. Compiler allows the user to perform customized task on machine. Initially for writing compiler machine language was used. After some development assembly language and these days high level language are used for writing compiler. We need compiler because it allows us to communicate with hardware. It is also use to cover the "GAP" between Humans and the computer language. Computer can understand only one language that binary language consists of only two digits are 0 and 1.

Binary language is also called machine language. When there is only Machine Language then programmers write their compilers in this language. But it is very difficult and tedious job. The role of compiler is take source code written in high level language (Java, C++, VB.Net etc). The High Level Languages are easily understood by humans. So compiler converts the program written in formal language (Source language) into machine language (target language). As we know that computers can easily understand machine language. There are different programs related to compiler that works before compilation such as editor, preprocessor, assembler, linker or loader, debugger and profiler.

ii.

Interpreter tool

An interpreter is a computer program that executes other programs. This is in contrast to a compiler which does not execute its input program (the source code) but translates it into executable machine code (also called object code) which is output to a file for later execution. It may be possible to execute the same source code either directly by an interpreter or by compiling it and then executing the machine code produced.

An interpreter reads an executable source program written in a high level programming language as well as data for this program, and it runs the program against the data to produce some results. One example is the UNIX shell interpreter, which runs operating system commands interactively. The difference between interpreting and translation is only the difference in the medium: the interpreter translates orally, while a translator interprets written text. Both interpreting and translation presuppose a certain love of language and deep knowledge of more than one tongue.

SOURCE CODE

INTERPRETER

RESULTS

Interpreter reads the source code

The results appears on the screen

Figure: 2.3.1 - INTERPRETER

2.4

Syntax errors in java

...expected

The syntax of Java is very specific about the required punctuation. This error occurs, for example, if you forget a semicolon at the end of a statement or don't balance parentheses:

if (i > j // Error, unbalanced parentheses

max = i // Error, missing semicolon

else

max = j;

Unfortunately, this syntax error is not necessarily caught precisely at the point of the mistake so you must carefully check the preceding characters in the line or even in a previous line in order to find the problem.

Eclipse:

Syntax error, insert ") Statement" to complete IfStatement

Syntax error, insert ";" to complete Statement

Eclipse is more informative as to the precise syntax error encountered.

unclosed string literal

String literals must be enclosed in quotation marks.1 This error occurs if you fail to terminate the literal with quotation marks. Fortunately, the syntax of Java requires that a string literal appear entirely on one line so the error message appears on the same line as the mistake. If you need a string literal that is longer than a single line, create two or more literals and concatenate them with +:

String longString =

"This is first half of a long string " +

"and this is the second half.";

Eclipse: String literal is not properly closed by a double-quote In Eclipse you can write a string literal of arbitrary length and the environment will break the string and insert the + automatically.

illegal start of expression

Most programming constructs are either statements or expressions. This error occurs when an expression is expected but not found. In Java, an assignment statement is considered to be an expression which returns a value, so errors concerning expressions also apply to assignment statements.2 Examples:

An extra right parenthesis after the condition of an if-statement:

if (i > j) ) // Error, extra parenthesis

max = i;

Eclipse: Syntax error on token ")", delete this token3 Eclipse diagnoses this as a simple syntax error and does not mention expressions.

Forgetting the right-hand side of an assignment statement:

max = ; // Error, missing right-hand side

Eclipse: Syntax error on token "=", Expression expected after this token

not a statement

This error occurs when a syntactically correct statement does not appear where it should. Examples:

• Writing an assignment statement without the assignment operator:

• max ; // Error, missing =

Eclipse: Syntax error, insert "AssignmentOperator Expression" to complete Expression

• Misspelling else:

• if (i > j)

• max = i;

• els ; // Error, else not spelled correctly

The reason you do not get "else expected" is that you need not write an else alternative so this just looks like a bad statement.

Eclipse:

els cannot be resolved

Syntax error, insert "AssignmentOperator Expression" to complete Expression

The same identifier can be used in different methods and classes. An important task of the compiler is to resolve the ambiguity of multiple uses of the same identifer; for example, if a variable is declared both directly within a class and also within a method, the use of its unqualified name is resolved in favor of the local variable. This error message simply means that the compiler could not obtain an (unambiguous) meaning for the identifier els.

The following code:

if (i > j)

max = i;

els // Error, else not spelled correctly

max = j;

results in a weird error message:

x.java:6: cannot find symbol

symbol : class els

location: class x

els

The reason is that the compiler interprets this as a declaration:

els max = j;

and can't find a class els as the type of the variable max.

Eclipse: Duplicate local variable maxels cannot be resolved to a type These messages are more helpful: first, the use of the word type instead of class is more exact because the type of a variable need not be a class (it could be a primitive type or interface); second, the message about the duplicate variable gives an extra clue as to the source of the error.

The error can also be caused by attempting to declare a variable whose name is that of a reserved keyword:

void f() {

int default = 10;

}

Eclipse:Syntax error on token "default", invalid VariableDeclaratorId

Cannot find symbol

This is probably the most common compile-time error. All identifiers in Java must be declared before being used and an inconsistency between the declaration of an identifier and its use will give rise to this error. Carefully check the spelling of the identifier. It is easy to make a mistake by using a lower-case letter instead of an upper case one, or to confuse the letter O with the numeral 0 and the letter l with the numeral 1.

Other sources of this error are: calling a constructor with an incorrect parameter signature, and using an identifier outside its scope, for example, using an identifier declared in a for-loop outside the loop:

int[] a = {1, 2, 3};

int sum = 0;

for (int i = 0; i < a.length; i++)

sum = sum + a[i];

System.out.println("Last = " + i); // Error, i not in scope

Eclipse: ... cannot be resolved

... is already defined in ...

An identifier can only be declared once in the same scope:

int sum = 0;

double sum = 0.0; // Error, sum already defined

Eclipse: Duplicate local variable sum

array required but ... found

This error is caused by attempting to index a variable which is not an array.

int max(int i, int j) {

if (i > j) return i;

else return j[i]; // Error, j is not an array

}

Eclipse: The type of the expression must be an array type but it resolved to int

Semantic error

In programming, creation wrong places of coding, writing a valid programming structure with unacceptable logic. The compiler will generate instructions that the computer will execute, because it understands the syntax of the programming statements, but the production will not be correct.

Eg:-

Changing the event.

Figure1.2

Example Program in Microsoft Visual C++ Syntax Errors and Warnings Window

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.