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

  • Assignment 1.1: Employee class + get/set methods - Unlimited number of employees.
  • Assignment 1.2: Student class + get/set methods - Unlimited number of students.

Use a two-dimensional array in the following problem. Your task is to create a simple Java program which would solve this problem. 

You MUST use a 2D array of Strings to solve this problem.

  1. Ask the user which cart of laptops they wish to book. For simplicity sake assume there are 6 laptop carts available for booking.
  2. Ask the user which period they wish to book. Assume there are 4 periods available for when they can book out laptops.
  3. Ask the user the name of the teacher who is booking and store that name into the 2D array at the appropriate location.
  4. Display the 2D array to the user in a friendly way clearly showing where the teacher has booked their laptops. I recommend initializing the 2D array at the beginning of the program so your output will be user friendly.
  5. Allow the user to loop the program and book another teacher if they wish. If the user picks a slot already used by a teacher it's ok, allow them to overwrite the existing teacher's name in that spot.

Use a two-dimensional array in the following problem. . Your task is to create a simple Java program which would solve this problem.


You MUST use a 2D array of Strings to solve this problem.


Ask the user which cart of laptops they wish to book. For simplicity sake assume there are 6 laptop carts available for booking.

Ask the user which period they wish to book. Assume there are 4 periods available for when they can book out laptops.

Ask the user the name of the teacher who is booking and store that name into the 2D array at the appropriate location.


Allow the user to loop the program and book another teacher if they wish. If the user picks a slot already used by a teacher it's ok, allow them to overwrite the existing teacher's name in that spot.


days= ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']

a= input()

b = int(input())

i = b % 7 -1 

if a in days:

  d = days.index(a)+i

if d >= 7:

  d = d - 7

print(days[d-1])

this code is not working

how to print days


You are given a list L. Write a program to print all numbers in the list which are exactly repeated twice. The order of numbers should be same as in list.(for example if 3 appeared before 2 3 should be printed first.) 

If no such number exist do not print anything. (input will be handled by us)


Input

[2,2,3,4,5,6,6,7,8,8,8,10, 3]


output

2

3

6


Explanation

Since 2, 3 and 6 is repeated 2 times output is 2, 3 and 6, whereas 8 is repeated 3 times so it is not printed.


Write a function that takes an input parameter as a String. The function should replace the alternate words in it with “xyz” and print it. Words are separated by dots. (Avoid using inbuilt function) If input is “i.like.this.program.very.much” Output will be “i.xyz.this.xyz.very.xyz” in java


num1 = int(input("Enter a Number: "))



num2 = int(input("Enter another Number: "))



operator = str(input("Enter the Operation you want: "))




if operator == "+":



print("Result is:" , (num1 + num2))




elif operator == "-":



print("Result is:" , (num1 - num2))




elif operator == "*":



print("Result is:" , (num1 * num2))




elif operator == "/":



print("Result is:" , (num1 / num2))




elif operator == "%":



print("Result is:" , (num1 % num2))




error in output: File "main.py", line 1, in <module>



num1 = int(input())



ValueError: invalid literal for int() with base 10:




n = int(input())
line = []

for i in range(0, n):
    line.append(input())
    print(max(line))
#test cases failed

Develop a custom class called Contact(Name, Dob, Phonenumber) which has methods such as Read() and Display() with the following criterions. Read Name (Text: maximum length 50), Dob(Date: after 01/01/2000) and



Phone numbers(Integer) from user and some of these accepting only a specific format with the four-digit area and six-digit local codes accepted as ten digits, or separated into blocks using hyphens or spaces, and with the area code optionally enclosed in parentheses.



For example, all of these are valid: 0426-123-456, (0432) 123456 and 0432



123456.



Read the phone numbers from console and for each one echo the number in the form "(999) 999 9999" or report an error for any that are invalid, or that don't have exactly ten digits.



Show how the object creations and manipulations are done for 'N' valid



Contacts.



Finally store the contacts in a separate .csv file

3. Term

by CodeChum Admin

Construct a class called Term. It is going to represent a term in polynomial expression. It has an integer coefficient and an exponent. In this case, there is only 1 independent variable that is 'x'.


more details here. Important!

https://pastebin.com/wMX2BhFk


LATEST TUTORIALS
APPROVED BY CLIENTS