Create a class called Car. The Car class has the following fields: int speed, double
regularPrice, String color.
Create a sub class of Car class and name it as Truck. The Truck class has the
following fields and methods: int weight, double getSalePrice(); //If
A system has a 16 byte memory. Therefore it can hold only 8 integers. Initially the
memory is empty. It can perform four operations. They are
1. Push
2. Pop
3. Enqueue and
4. Dequeue
Here Push, Pop operations maintain the rules of a simple stack and Enqueue, Dequeue
operations maintains the rules of a simple queue. If the memory is full then the system discards
any push or enqueue operation and if the memory is empty then it discards pop
and dequeue operations. Now write a program using the concept of stack and queue to
simulate the system.
Input: Test case will start with an input n that contains the numbers of operations. Next n
line will have the operations. Specifications of operations are given below:
E x : Enqueue x // here x is an interger number
D : Dequeue
P x : Push x
O : Pop
Output: Output the final memory status of the system. If the memory is empty print a
message “Memory is Empty”.
Sample input :
12
D
P 7
P 9
E 13
P 17
D
E 19
D
P 23
O
O
E 18
Sample output:
13 17 18
The school of Computing and Mathematical Sciences is open for registration of ICT qualifications. Create a registration form that accepts a prospective student’s name, surname, race, gender, cellphone number, email address, home address and the ICT qualification the student wishes to apply for (Diploma in ICT: Applications Development, Advanced Diploma in ICT: Application Development, Post Graduate Diploma in ICT: Applications Development). Upon completion of the form, the prospective student must agree to the terms and conditions of the university by selecting a checkbox and submit the form. Insert this data into the database. Also include a delete and update button.
NB: Please align your textboxes and text fields
A queue data structure is given with enqueue and dequeue operations. WAP to implement a stack using instances of queue data structure and operations on them
A stack data structure is given with push and pop operations. WAP to implement a queue using instances of stack data structure and operations on them.
Given a Queue consisting of first n natural numbers (in random order). The task is to check whether the given Queue elements can be arranged in increasing order in another Queue using a stack. The operations allowed are:
Write a C code to replace every element in a linked list with the next greatest element present in the same list.
Write a C code to add two polynomials using array.
Consider a 20 *5 two-dimensional array marks which has its base address = 1000 and the size of an element = 2. Now compute the address of the element, marks[18][ 4] assuming that the elements are stored in row major order.