Hi I am doing an assignment on ER modelling and there is a part that I'm stuck on, here is an extract:
Patient is a person who is either admitted to the hospital or is registered in an outpatient program. Each patient has a patient number (ID), name, dob, and tele. Resident patients have a Date Admitted. Each outpatient is scheduled for...
The following code was been given from our school as a sample for circular linkedlist and told each student to build a own version of circular linkedlist.
Now my query is that is the following code is really a circular linkedlist ?
// Program of circular linked list
#include <stdio.h>
#include <malloc.h>
struct node
{
int info;
...
Can you see anything that might have been left out for a simple bug tracking system?
Here's an updated version with new changes
...
How can i model foollwing problem statatement into java classe?
I have a class vehincle.
Vehicles can be of type Trucks, Cars, Scooters, motorcycles.
Vehicle has a engine.
engine shold have following contraints
Petrol Engine and Diesel Engine are types of Engines
Truck comes with 4 stroke, 12 cylinder Diesel Engine
Car can have eithe...
Implement a template class named MyStack that creates a stack using STL class vector. MyStack class will have two functions – push() and pop(). Since MyStack is a template class, it must be written in such a way that it can be used to create stack of any type of data (both built-in and custom type). When an element of the stack is popped...
Hi, I would like to build a method that outputs 1000 if the input number is thousands (eg. 3458), 100 if it is hundreds and so on. Is this possible? Please, sorry for my english.
...
One person is standing above the pyramid having 100 steps.He can take 1 or 2 steps at a time to come down.So there are how many possible ways he can come down?
I want to solve this problemin c programming language
Please Help to solve this problem
...
On a server, a process monitors the files in a Unix file system.
If a client sends the file name to be monitored, the server has to send the report to the client whether that file got changed or deleted.
For server-client communication, we should use either message queues or sockets.
For every change in the file, the server has to not...
What kind of algorithm should i use to calculate 2^n . . Where n is always greater than 100 . . Suggest a good algorithm using c :)
...
Write an algorithm to check whether a set A is proper set from B or not.
(Hint: proper set is that set A is subset from B but they should not be equal, the result should be either True or False, if true that means A is proper set else it is not proper set)
...
#include<stdio.h>
main( )
{ int num[ ] = {24, 34, 12, 44, 56, 17};
dislpay(&num[0],6);
}
display ( int *j, int n )
{
int i ;
for ( i = 0 ; i <= n - 1 ; i++ )
{
printf ( "\nelement = %d", *j ) ;
j++ ; /* increment pointer to point to next element */
}
}
The language is c, windows vista using visual c++ 2005 express.
...
I want the expression (x-x) to be simplified to 0.
type aexpr =
| CstI of int
| Var of string
| Add of aexpr * aexpr
| Sub of aexpr * aexpr
| Mul of aexpr * aexpr;;
let rec simplify expr =
match expr with
| Add(CstI(n1), CstI(n2)) ->CstI(n1 + n2)
| Sub(CstI(n1), CstI(n2)) ->CstI(n1 - n2)
| Mul(CstI(n1), CstI(n2)) ->CstI(n1 * n2)
| Add...
I know how to do this in other languages, but not C++, which I am forced to use here.
I have a Set of Strings that I'm printing to out in a list, and they need a comma between each one, but not a trailing comma. In java for instance, I would use a stringbuilder and just delete the comma off the end after I've built my string. How do I d...
Here is my code:
void reverseStr(char *str)
{
if (str == NULL) return;
int i=0, j=strlen(str) -1;
while(i<j)
{
char temp = str[j]; //i think this is the cause of the problem
str[j] = str[i];
str[i] = temp;
i++;
j--;
}
}
So here is where it is called:
int main()
{
...
This is for my Java programming assignment, and I've only been working with Java for about 3 months.
We need something simple, so I thought of going with a program that allows the user to customise and design a greeting card cover. Not too complex, it's an introductory course. I would really like some guidelines on how to go about this...
Could anyone please help me with my assignment questions? I've done most of it but I'm still stuck on these 3 questions.
Here is the question:
Consider the following types of search trees and balanced trees
data STree = Leaf | Node STree Int STree
data Btree = Tip Int | Branch Btree Btree
whose constructors are subject to ...
What keyword or function is used in Java to release memory?
...
Here's my problem:
If need to implement a B-Tree for University:
I have an "outer" class B-Tree with attributes root and _degree. The class to represent the nodes is implemented as a static-member class:
public class BTree<E> {
private Node<E> root;
// the minimal degree
private int degree;
public BTree(int degree) {
...
i have a class as follows
public class Polygon extends Shape{
private int noSides;
private int lenghts[];
public Polygon(int id,Point center,int noSides,int lengths[]) {
super(id, center);
this.noSides = noSides;
this.lenghts = lengths;
}
}
Now a regular polygon is a polygon whose all sides a...
Hi, i am a newbie to python 2.7 , trying to create a simple program, which takes an input string from the user, converts all the characters into their ascii values, adds 2 to all the ascii values and then converts the new values into text. So for example, if the user input is "test" , the output should be "vguv".
This is the code i have...