answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is Objectives Oriented Evaluation Approach to program evaluation?

Objectives Oriented Evaluation Approach is the means by which the worth or merit of a program is assessed based on the extent to which the objectives or purposes of the program are being achieved.

Keywords in a programming language that allow the programmer to redirect the flow of the program based on a decision are called?

Keywords in a programming language that allow the programmer to redirect the flow of the program based on a decision are called

When to use Inheritance in C?

Assume the question was for C#, not C.

":" is syntax to extend a type. If the type extended from is another class, they form a class hierarchy and the "inheritance" is established:

For example:

class Base {}
class Derived : Base {}

Derived extends Base, and thus inherits from Base.


What is the definition of a base-class constructor?

A base class constructor is simply a constructor that is declared within a base class. There is nothing particularly special about them since all constructors are only of relevence and applicable to the classes in which they are declared.

How can you erase a password that you can not remember?

The best thing to do, if you are good at computers and are able to do this, would be to perform a password recovery. If you are not very good at computers, you would need to take your computer to a computer maintenance and repair shop, or local tech support facility, and have them perform the password recovery. Usually, if you are the one that made the password, you also input a clue as to what your password may be, which is made accessible by clicking the "?" if you are using the Welcome Screen on Windows XP.

What is complete binary tree in c?

The basic idea (you write functions CountChildren, GetChild, NewBinTree):

struct GenTree;

struct BinTree;

typedef struct GenTree GenTree;

typedef struct BinTree BinTree;

int CountChildren (const GenTree *from);

int GetChild (const GenTree *from, int which);

BinTree *NewBinTree (DATATYPE data, BinTree *left, BinTree *right);

BinTree *Convert (const GenTree *from)

{

BinTree *bt, *tmp;

int i, n;

if (from==NULL) return NULL;

n = CountChildren (from);

bt = NewBinTree (from->data, NULL, NULL);

if (n 1) return bt;

tmp = Convert (GetChild (from, n));

for (i=n-1; i<=2; --i) {

tmp= NewBinTree (<NODATA>, Convert (GetChild (from, i)), tmp);

}

bt->right = tmp;

return bt;

}

Why object oriented analysis and design useful?

:-- Object-oriented development is not a new technology but it has not had widespread use and is still maturing. Object-oriented analysis starts you on a path that can lead to benefits not only in the analysis process but in subsequent development phases. Proponents of the object-oriented approach list the benefits as an easier way to promote the understanding of a system, reusability of models and programming, modifiability and reduced costs associated with change, and reduced development risk. These benefits lead to a superior method of analyzing business processes and requirements. Finally, because the contemporary view of development is from the object-oriented perspective, object-oriented analysis allows you to take advantage of the contemporary programming languages, operating systems and associated tools. [1 p.215, 16 p.493, 12, 2 p.11]

Objects are said to replicate what humans see in real life and, therefore, appeals to human cognition. The object-oriented paradigm views the world as composed of objects with well-defined properties, with objects replicating things in an environment. [19] It is easier to promote a user's understanding when the user is presented with objects describing things found in the normal course of conducting business. For example, it is much easier for accountants to view a system when entities such as customers, checks, invoices and receipts are used. The user can, therefore, better visualize the concepts of the system and assist the analyst in describing the system by focusing on what is to be accomplished rather than focusing on procedures. [12, 16 p.493]

Reusability is a desired goal of all development and is based on the reluctance of reinventing something when it has already been invented. Object-oriented development supports this, especially in the concept of abstraction. [3] Abstraction supports continual iterations of analysis until unique objects are found in a class hierarchy. These unique objects inherit characteristics from the higher level classes and this allows you to reuse information from the previously defined classes, eliminating the need to reinvent it. Class structure leads to the development of class libraries that allow the sharing of models and programming throughout a system. The development process can be simplified, from analysis to requirements to implementation, through the use of the building blocks of classes and objects. [12, 18, 3]

The use of objects makes it easier to change and modify systems. For example, the year 2000 (Y2K) problem may have been eliminated by identifying a date object within a system and accessing this object when you needed to date an operation. If the date object had the state variables of month, day and year with each defined as two-character variables, the only change that would be necessary to correct the Y2K problem was to change the year state variable of only the date object. No need to examine multiply lines of code or to use significant resources to locate all the processes using a date functionality and the appearance of it in a procedural program. Modification of systems can also be accomplished through adding methods or state variables to objects. Because encapsulation isolates unnecessary methods and messages from other objects, you can add this type of information to an object to allow it to interact with another object. Theoretically, you are changing the system without having an effect on the existing object interactions. [12, 3]

The risks associated with the development process are reduced by providing a methodology that promotes understanding of a system, making information easy to use and reuse throughout a system, and developing a system that is easier to modify and change making the maintenance process easier. It helps to reduce the complexity of the analysis and development process.

Describe the four basic data types in c?

Describe the basic data types in C

Describe the basic data types in C

Does each programming language have its own specific IDE?

No. Some languages are interpreted, not compiled.

No. Some languages are interpreted, not compiled.

No. Some languages are interpreted, not compiled.

No. Some languages are interpreted, not compiled.

What is one disadvantage of the internet?

Some of the negative impacts of internet of society are the quick spread of vices, because most of the ills in society tend to go viral on the internet. People quickly take up the wrong role models because of the glorification of societal vices.

How does an interpreter translate high-level code to machine code?

A computer does not execute a program in a high level language. A computer executes a program in machine language. The high level language is converted into machine language by a compiler. Alternatively, an interpreter executes on the computer in machine language and the interpreter executes the high level language.

What kinds of programming languages may be developed and used in the future?

It is always very hard to predict the future, especially in an area which has seen very rapid development over the past two decades.

In software engineering of applications interfacing with human users, powerful new declarative approaches are the modern choice, such as Microsoft's Windows Presentation Framework (WPF) and its XAML language, or Adobe's Flex (with MXML), and others.

It is probably fair to assume that the declarative part of application design will grow in the near and mid-term future, taking even more responsibility for the mundane tasks related to graphical user interface development off the programmer. This allows to focus more implementing the application's core algorithm and logic.

It's probably also fair to assume that the dividing line between desktop applications, web applications and mobile applications continue to diminish both in term of design as well as in terms of usability: applications will increasingly work within a web browser, and it will be common to have a (possibly feature reduced) mobile app on a smart phone or tablet computer, or a desktop app all resulting from the same development effort.

It is fair to assume that programming languages will continue supporting this goal in even more comprehensive hardware abstractions and increased automation of the housekeeping work.

What is used to translate source code instructions into appropriate machine language instructions?

Languages are either "Compiled languages" or "interpreted languages":

- A compiled language will use a compiler which is another program that checks your code and then converts it to the correct machine code for the machine it is intended to run on. You can only run the program after you have compiled it. A compiler can help spot syntax errors and certain semantic errors and will give you a "compilation error".

- An Interpreted language can be ran directly as long as you have another program called the interpreter which translates your code into machine code whilst it is running. This means certain errors will not be caught before runtime (There is no concept of a compilation error) and so you won't know until runtime if certain errors are present in your code

Describe three advantages of Java programming language?

Java has many more than 3 characteristics, which can be labelled "advantages"; of course, most of the following are shared by several other languages.

  • Java is object oriented (I wouldn't want to program on any language that doesn't!)
  • Java runs on multiple platforms (Windows, Linux, etc. - some languages work only for Windows, for example).
  • Java has native support for Unicode - this is the standard for strings. (This makes it easy to use Java with different languages, including languages that don't use the Latin alphabet.)
  • Java has built-in support for multithreading. This makes it possible to run several things at once.
  • The designers of Java have put a lot of effort into detecting many error situations during compilation. That will increase the quality (stability) of the finished product.
  • Java is free.
  • There is a huge collection of components already written in Java, for different aspects. This means that in many cases, you don't have to design everything from scratch.

Where are data structures used?

It would probably be easier to ask where they aren't used. Even a one-dimensional array is a data structure, thus all strings are data structures. There are relatively few programs that don't require strings and even fewer that don't require arrays. But even they will use one or more data structures because a program without data of any kind would be completely useless.

What is difference between linked list and singly linked list?

Answer

singly linked list has the node inserted only at one end. and the pointer corresponds to the next pointer.
but in a doubly linked list, the node pointer points to the both previous and the next node.
singly linked list has two nodes
doubly linked list has three nodes

A doubly linked list makes sense when you need to traverse the list in both directions. You aren't able to do that with a singly linked list.

Types of programming language that is machine independent?

FORTRAN (FORmula TRANslator) is the best-known earliest example of machine independent language. This is where the language is not dependent on the characteristics of the computer.

COBAL (COmmon Business-Orientated Language) is the other type of programming language that is machine independent. COBAL was developed by the US Navy for business applications.

Why is object oriented system important?

At "AchieversIT," we emphasize the importance of object-oriented systems (OOS) for modern software development. Here are the key reasons why OOS is essential, especially in the context of our training:

Modularity and Manageability: OOS promotes a modular approach, breaking down complex software into manageable components. This aligns with our focus on building structured and maintainable code, making it easier for our students to understand, modify, and extend their applications.

Reusability: Reusability is a core concept we instill. By teaching the principles of objects and classes, we empower our students to create reusable components, saving development time and fostering best practices.

Encapsulation for Security: Encapsulation is vital for data security and integrity. We stress the importance of encapsulating data and methods within objects, ensuring proper access control and reducing the risk of unintended data manipulation.

Abstraction for Clarity: Our training covers the value of abstraction in simplifying complex systems. Through modeling real-world entities as classes, we help students focus on essential features, leading to cleaner and more maintainable code.

Inheritance and Code Organization: Inheritance facilitates code reuse and organization. By understanding inheritance, our students learn to build well-structured class hierarchies, making their codebase more efficient and extensible.

Polymorphism for Flexibility: Polymorphism, a crucial OOS concept, fosters adaptability in software. Our students grasp the power of polymorphism, enabling them to create flexible systems where objects can respond differently to common method calls.

Collaborative Development: Our training promotes collaboration among developers. We teach students to work cohesively, leveraging the modular nature of OOS for parallel development, enhancing efficiency, and reducing bottlenecks.

Scalability Principles: We highlight the scalability benefits of OOS. Our students learn how to add new functionality without disrupting existing code, a crucial skill for building scalable applications.

Real-world Modeling: OOS aligns with real-world modeling, enhancing communication between developers and stakeholders. Through OOS, our students gain the ability to model complex systems more naturally and effectively.

Maintenance and Evolution Mastery: OOS simplifies maintenance and evolution. Our training equips students with the skills to make changes efficiently, reducing the risk of introducing errors in other parts of the system.

By imparting these OOS principles, "AchieversIT" ensures that our students not only master the technical aspects but also understand the fundamental design principles that underlie modern software engineering. This holistic approach prepares them to excel in the dynamic field of software development.

What is the difference between cut and a copy command?

a copy command would copy the contents of the selection and when you paste it somewhere else, the original contents would still be there. the contents would be available in both the original location and the new location

a cut command would remove the contents of the selection and when you paste it somewhere else, the original contents would be lost. it would be available in the new location only.

Write a program which uses Command Line Arguments?

IN C++

#include <iostream> int main(int argc, char *argv[]) { using namespace std; cout << "There are " << argc << " arguments:" << endl; // Loop through each argument and print its number and value for (int nArg=0; nArg < argc; nArg++) cout << nArg << " " << argv[nArg] << endl; return 0; }

How compile the code compiler and interpriter?

No generic answer for this question, specify your operating system and compiler.

For example in unix: cc -g -o myprog myprog.c

in linux: gcc -g -W -Wall -pedantic -o myprog myprog.c

What is the best method of data processing?

There are different methods of data processing. Some methods are manual data processing, mechanical data processing, online processing, batch processing and electrical data processing.