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

Evaluate how the debugging process can be used to help develop more secure, robust applications.


  1. create an address class. Pass Country, City, Street Name, and House Number in Address class constructor and create a diagram

You work in a printing office that the machine there can print documents in different colors. It gets an integer number between 1 to 7 and prints the documents in rainbow colors, as shown in the following table:

Number Matched Color

1 Violet

2 Indigo

3 Blue

4 Green

5 Yellow

6 Orange

7 Red


Design an algorithm and write a C++ program to do the following:

  • Prompt user to enter a number between 1 and 7
  • Use selection structure such as if-else or switch to find the color based on the previous table
  • Output the color related to input number. See the sample output.
  • Save the output in a file named “color.txt”.

Sample Run

Enter a number between 1 and 7: 2

You have selected number 2 which is orange.


Output File "color.txt"

You have selected number 2 which is orange.

Here are the numbers and match colors:

1 ------- Violet

2 ------- Indigo

3 ------- Blue

4 ------- Green

5 ------- Yellow

6 ------- Orange

7 ------- Red


Write a Program: Invoice 

A customer makes a purchase at the store. The tax rate is 8% on all purchases 

except groceries. The store offers a 5% discount to seniors 60 and over. You 

should ask the user three questions: what they have bought (use a menu 

displaying bread, milk, or soap), what the purchase price is, and how old they are. 

Your goal is to print a formatted invoice with the following line items: price, tax, 

discount, and total. The discount should only be printed if applicable.  

You should test your program with 5 data sets: with and without tax and with and 

without the senior discount. The fifth data set makes an invalid choice of the 

menu item, in which case your program should not ask any more questions and 

output an error message.


WEB230 JavaScript 1 Assignment 3 - Quiz Average In this assignment we will write a JavaScript program to calculate the average of a set of quiz marks. Instructions 1. Create variable containing an array that will contain five or more numbers that represent the marks on quizzes. It is assumed that all quizzes will be out of 10 so the numbers must be values between 0-10. 2. Create a function that will take the array as an argument and return the average of the quizzes. 3. Output a text message with the values of the quizzes, space seperated without brackets. Use a template literal when constructing the output strings (AKA back-ticks, template literals are explained in the section on Strings in Chapter 1). 4. Output a text message with the final average rounded to one decimal place. Again use a teplate literal. 


You are hired by an ice-skating center. Your job is to write a program to do calculate the admission fees as follows: 

• Children 6 and younger $8.50

• Children 7 and older. $10.50

• Adults $12.00

• Seniors $9.50


There will be 10% tax. PNG students, staff, and faculty will receive 25% discount (before tax).


Design an algorithm and write a C++ program that prompts the user to input the number of tickets in each group age and if the user is a student, staff, or faculty at PNG. The program calculates and outputs the admission fees as illustrated in the sample runs.


Output:

Are you PNG student, staff, or faculty?

Enter Y for yes or enter N for no: Y

Enter the number of children 6 and younger : 1

Enter the number of children 7 and older : 1

Enter the number of adults : 1

Enter the number of seniors : 1


  ******You received %25 Discount*****


Subtotal ......$30.38

Tax ...........$3.04

Total .........$33.41




 Write a complete program from the #include at the top through return 0; } at the bottom.

Define three char variables char1, char2, and char3

(You may also wish to define a result variable).

Have the user enter three lowercase char characters.

(You may assume that the user correctly enters three lowercase characters.)

Compare these three characters and print only the character

that appears first in the alphabet














create a doubly linked list in c , in which each node stores a string . on inserting a node , node previous to it , current node and next node should be printed . also write a function to delete a specified node . write a function to return node which is n steps forward and n steps backward to current node .


 This lab is a warm-up for the next assignment. We will learn to build a multi-threaded application. You will write a function that will simulate a long task. You will call the first method a number of times sequentially and record the time it takes to complete. They will call the first method again but in a threaded manner and time, the execution and then compare the two times. Description Create three functions:1.Create a function to the following:a.Take a string argument (name).b.Create a loop that will run 100 000 times. In this loop, the program will sleep 0.0001 seconds.c. After the completion of the loop, prints its name and a brief message.2.Create a second function to do the following:a. Takes a number argument (times to execute the loop).b.Store the current time. c.Call the function in step 1 the required number of times (sequentially).d.Check the elapsed time after the above calls are complete. e. Print the results as well as a brief message.

Design a 'book' class with title, author,publisher, price and author's royalty as instance variables. Provide getter and setter properties for all variables. Also define a method royalty() to calculate royalty amount author can expect to receive the following royalties :10% of the retail price on the first 500 copies ;12.5% for the next, 1000 copies sold, then 15% for all further other copies sold.


Then design a new 'ebook' class inherited from 'book'class.Add ebook format (EPUB, PDF, MOBI etc) and additional instance variable in inherited class.


override method to deduct GST @12% on ebooks

LATEST TUTORIALS
APPROVED BY CLIENTS