Programming & Computer Science Answers

C++ 9913
Python 5288
Java | JSP | JSF 3611
C 1680
C# 1362
Computer Networks 989
Algorithms 652
Databases | SQL | Oracle | MS Access 641
HTML/JavaScript Web Application 588
Other 537
Visual Basic 358
Assembler 209
Software Engineering 202
AJAX | JavaScript | HTML | PHP 166
MatLAB 150
MatLAB | Mathematica | MathCAD | Maple 124
Action Script | Flash | Flex | ColdFusion 112
UNIX/Linux Programming 89
Web Development 73
Excel 36
ASP | ASP.NET 23
Delphi | Pascal 21
Perl 16
Prolog 9
Functional Programming 9
MathCAD 5
Wolfram Mathematica 4
WPF 4
Ruby | Ruby on Rails 3
NodeJS Web Application 2

Questions answered by Experts: 26 876

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

1.  Identify two instance variables and two methods from the case below.

An application that manipulates Points on a plane is to be designed using Objected Oriented

Design. In this application, Points must have X and Y coordinates, move on the plane as well as display their current values of X and Y. Points can also determine if they are in the zero position (0,0) with a Boolean answer. [8]

 

a. Assume the existence of a Java file myClass.java. Explain how Java uses both a compiler and interpreter to achieve its architecture-neutral characteristic. [5]

b. Using an example, explain the implication of using the keyword void in a method declaration

c. Given an Object-Oriented System that manages student records (name, date of birth,[3]

d. gender etc), use examples to differentiate between Class and Object as used in OOP.[4]


1. If you were designing a Web-based system to make airline reservations and sell airline tickets,

a. Which DBMS architecture would you choose from and why?

b. Why would the other architectures not be a good choice?


2. Design a database for an airline. The database must keep track of customers and their reservations, flights and their status, seat assignments on individual flights, and the schedule and routing of future flights. Your design should include an E-R diagram, a set of relational schemas, and a list of constraints, including primary-key and foreign-key constraints.

1. Consider the relations

Lecturer (firstName, lastName, email,course)

i. Print all the information about lecturers who handles DBMS

ii. Print the names and emails of those lecturers who take HCI

iii. Find the lecturer with the surname “feel free “and also handles “DBMS”


b) Use the schema below to express the following queries using Relational Algebra Research_Student(Name, Grad_Univ, CGPA, Age, Email) 

i. Find all research students who have their CGPA is greater than 3.5 and their ages of greater than 25 years.

ii. Find the names and emails of research students who have their CGPA less than 2.5



  1. Write an algorithm to implement each of the following: 

i. linear search of elements in a 1-D array

ii. binary search of an element in a 1-D array


b) Write a code structure in C++ on how to insert a node in a singly linked list




Please follow the introduction to write Python code for rounding withour use round function .screenshot and explanation request!Thanks in advance!

1. first need to check if the number is positive or negative and save

2. Get rid of any numbers you don't need.

4. Get the last digit.

5. if >5 add 1 , If less than 5, leave it , If equal to 5, the last number should be even.

6. Convert it back to decimal

Write a function round(number[, ndigits]) that models the behavior of the built-in function.

Input: a float number, and an optional argument, a non-negative integer ndigits. The default parameter

value for ndigits is 0.

Output: if ndigits is 0, an integer, else a float, rounded to ndigits after the decimal point. If the first

dropped digit is greater than 5, round up; if the first dropped digit is less than 5, round down; else round

in such a way that the remaining digit in the smallest position is even.


  1. Write a C++ code structure to test for overflow condition on queue
  2. Write an algorithm to insert element at the beginning of a 1-D array
  3.  Write an algorithm to implement linear search of elements in a 1-D array 
  4. Draw a tree structure and use it to illustrate each of the following: 

      Height, Level, External node(s), Internal node(s), Depth of a node, Degree of a node, Ancestor(s) of a node, Descendant(s) of a node 



UPrint is a T-Shirt printing company that charges different rates depending on how many T-shirts a customer would like to have printed and how many colors will be used. The rates are as follows.

 

1 color

1–99 shirts: RM18 per T-shirt

100–249 shirts: RM16 per T-shirt

250 or more shirts: RM15 per T-shirt

2 colors

1–99 shirts: RM19 per T-shirt

100–249 shirts: RM17 per T-shirt

250 or more shirts: RM16 per T-shirt

3 colors

1–99 shirts: RM20 per T-shirt

100–249 shirts: RM18 per T-shirt

250 or more shirts: RM17 per T-shirt

 

Write a program in which a user can enter the number of T-shirts they would like to be printed and with how many colors (1, 2, or 3). Calculate the cost based on the company’s rates and include UPrint sales and use tax of 6%. Print this total ringgit amount to the screen, formatted to two decimal places. Here is a demo of the program.



Define a class complex with for real and imaginary part of two complex numbers, write a constructor function to initialize objects and display the real and imaginary parts.


  What is the output of the following C++ code?

int i = 0;

int temp = 1;

while (i < 5)

{

i = i + 1;

temp = temp * i;

}

cout << "i = " << i << " and temp = " << temp << endl;

 Write a program to compute and display the sum of a collection of resistors connected in series. The resistors value entered by the user until a value of 0 is entered. The program should end by displaying the sum of resistor value when 0 is entered.



LATEST TUTORIALS
APPROVED BY CLIENTS