Question

This is for my Object Oriented Programming class, I know how to set it up in...

This is for my Object Oriented Programming class,


I know how to set it up in Python, but clueless in setting it up as Javascript.

(1) Write a program that prompts the user for a positive integer and then prints a diamond pattern in which the number of asterisks on the middle line is equal to their entered integer. The example below printed if the user types in "3".

*
* *
* * *
* *
*
0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
This is for my Object Oriented Programming class, I know how to set it up in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • c++ object oriented programming

    object oriented programming:Write a program that converts a number entered in decimal toRoman numerals. Your program should consist of a class, say, romanType. Anobject of type romanType should do the following:a. Store the number as a decimal.b. Convert and store the number into roman form.c. Print the number as a Roman numeral or decimal number as requestedby the user.The decimal values of the Roman numerals are:M 1000D 500C 100L 50X 10V 5I 1

  • Write a program to create a set operation calculator applying object oriented programming principles discussed in...

    Write a program to create a set operation calculator applying object oriented programming principles discussed in the class so far. The set operation calculator need to be enclosed inside one class with different methods responsible for performing the different operations listed below. When the constructor (def __init__() ) is called during object instantiation, two separate objects of this class need to be instantiated two sets S1 and S2. These two set objects can be instantiated from two python lists taken...

  • C++ Object-Oriented Programming - Program using structs, functions, and a little of overloaded functions. The finished...

    C++ Object-Oriented Programming - Program using structs, functions, and a little of overloaded functions. The finished program should look exactly like the part at the bottom in gray text. Create two structures and name the types Account and Money. The Money struct has two variables One represents how many dollars you have The other represents h ow many cents you have .The Account struct has three variables - A Money struct that will represent how much money is in the...

  • object oriented programming solve 2 quetions 9 Lab 8 - Graphical User Interface (GUI) The assignments...

    object oriented programming solve 2 quetions 9 Lab 8 - Graphical User Interface (GUI) The assignments for this week are to understand the use of tkinter modules to create GUI in Python. 9.1 Assignment 1 1. Create the following window using the tkinter module in Python. The button Quit closes the window, and the button Show prints the first name and last name entered in the Entry boxes. First Name Last Name Quit Show 2. Create the following window using...

  • Object Oriented Programming C++ using class I need users (customers) to input their name and id....

    Object Oriented Programming C++ using class I need users (customers) to input their name and id. Program needs to have a menu: 1. Create - input id, name 2. List - see all the list of the users 3. Exit. It should be limited to 20 users only.

  • C# Goals: Practice building a class Use object oriented programming to solve a problem Problem Description:...

    C# Goals: Practice building a class Use object oriented programming to solve a problem Problem Description: Create a Windows Console Application using the .NET Framework For this application you will be designing a program that allows users to keep track of robot inventory. First, you will design a Robot class, and then build an application that creates Robot objects. Important formulas / relationships: Before we begin designing robots, we should understand a few key electrical terms and relationships. Terms: Voltage...

  • 8). Name five of the fundamental ter ns which encompass object-oriented programming 9). Write a class...

    8). Name five of the fundamental ter ns which encompass object-oriented programming 9). Write a class called NumberOfGoals that represents the total number of goals scored by a ootball team. The NumberOfGioals class should contain a single integer as data, representing the number of goals scored. Write a constructor to initialize the number of goals to Zero. 10). Write a set of instructions to prompt the user for an int value and input it using the Scanner class into the...

  • Please write this code in C++ Object-Oriented Programming, specify which files are .h, and .cpp, and...

    Please write this code in C++ Object-Oriented Programming, specify which files are .h, and .cpp, and please add comments for the whole code. Include a class diagrams, and explain the approach you used for the project and how you implemented that, briefly in a few sentences. Please note the following: -Names chosen for classes, functions, and variables should effectively convey the purpose and meaning of the named entity. - Code duplication should be avoided by factoring out common code into...

  • In this module you learned about Object-Oriented programming in C++ and how to combine this approach...

    In this module you learned about Object-Oriented programming in C++ and how to combine this approach with the concepts covered in previous modules For this assignment you will write a class called Dog that has the following member variables: birthyear. An int that holds the dog’s birth year. breed. A string that holds the breed of dog. vaccines. A Boolean holding a yes/no value indicating whether the dog is currently on vaccinations. In addition, the class should have the following...

  • 3. (a) Outline any four features of Object-Oriented Programming OOP, giving examples in each case. [16...

    3. (a) Outline any four features of Object-Oriented Programming OOP, giving examples in each case. [16 marks]      (b) Consider the following code fragments: If   a = 10; Evaluate the new value of “b” in the following:                (i)   b =   ++ a;               (ii) b = a ++;             What value would a and b store in (i) and (ii) after program execution?                                                                                                            [4 marks] 4. Create a C++ program that makes use of three arrays; name, mark, grade. The program should accept...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT