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 & Filtering

Write the following program in c++. i. Create a class of your own choice with 5 attributes. ii. Create an object of named objone in the intmain() function iii. Access attributes and set values for all the 5 attributes iv. Print all the attribute values v. Create a function in the class that add two number and access the function using the oblject.


Write the following program in c++.


Combine your first and second name and pick only the first five characters of your name for


the project.


i. Declare an array named name1 and put all the first five characters into it.


ii. Write a for loop with an if condition that will find and output the index value of a


searched character in the array. Let the program be such that the user will input the


character being searched for

Write a program in C++ with the following datatypes. Use the 3 different variables with the same data type. Explain the codes step by step. a. int b. float. c. double. d. string. e. bool


Write a function called has_duplicates that takes a string parameter and returns True if the string has any repeated characters. Otherwise, it should return False.



Implement has_duplicates by creating a histogram using the histogram function above. Do not use any of the implementations of has_duplicates that are given in your textbook. Instead, your implementation should use the counts in the histogram to decide if there are any duplicates.



Write a loop over the strings in the provided test_dups list. Print each string in the list and whether or not it has any duplicates based on the return value of has_duplicates for that string. For example, the output for "aaa" and "abc" would be the following.



aaa has duplicates


abc has no duplicates



Print a line like one of the above for each of the strings in test_dups.



Start with the following Python code.


alphabet = "abcdefghijklmnopqrstuvwxyz"


test_dups = ["zzz","dog","bookkeeper","subdermatoglyphic","subdermatoglyphics"]


test_miss = ["zzz","subdermatoglyphic","the quick brown fox jumps over the lazy dog"]


# From Section 11.2 of:


# Downey, A. (2015). Think Python: How to think like a computer scientist. Needham, Massachusetts: Green Tree Press.


def histogram(s):

d = dict()

for c in s:

if c not in d:

d[c] = 1

else:

d[c] += 1

return d


Copy the code above into your program but write all the other code


Describe how tuples can be useful with loops over lists and dictionaries, and give Python code examples. Create your own code examples.



Your descriptions and examples should include the following: the zip function, the enumerate function, and the items method.

write a Java programming create a arraylist of modulecode in class, use String []{CS401,CS402,CS403,CS404,CS405}


In the main ask user to selected the modulecode in arraylist ,

ask user to choose 3 to 4 modulecode ,

if user choose the same modulecode

,tell user select other one.

if user input error please so the error message.




Q/ how we convert primitive types to a String using toSting



method?

1/Write java application with the following information:


- Class Name ; Student


- Method1: AddStudent


- Method2: Print Students


- Method 3: totalStudent


- Method 4: Delete Student

Create a class named “student” that contains roll_number, stu_name and course_name,



father_name, DOB as data member and Input_student and display_student as member functions.



Create a Derived class named “exam” from the class named “student” with publicly inherited



mode. The derived class contains members as mark1,mark2,mark3 as marks of three subjects and



input_marks and display_results as member functions. Create an array of object of the “exam”



class and display the result of 10 students.




LATEST TUTORIALS
APPROVED BY CLIENTS