1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nignag [31]
3 years ago
10

Create a class named TestCircle whose main() method declares Several Circle objects. Using the setRadius() method, assign one Ci

rcle a small radius value, and assign another a larger value. Do not assign a value to the radius of the third circle; instead, retain the value assigned at construction. Display all the values for all the Circle objects. Save the application as TestCircle.java
Computers and Technology
1 answer:
emmainna [20.7K]3 years ago
5 0

Answer:ublic class Circle {

public int radius = 1;

public double diameter;

public double area;

//Constructor for circle class

public double Circle(int First){

return radius;

}

//Start set and get for radius

private double setRadius(int r){

   return radius = 5;

}

private double getRadius(){

 return radius;

}

//Start set and get for diameter

public double setDiamter(double d){

   return diameter = 7;

}

public double getDiamter(){

 return radius * diameter;

}

You might be interested in
There Are Two Programs in this Question who will attempt first i will give brainliest ans reward and big points:-
Korolek [52]

Answer:

here you go ,could only do Question 2.try posting question 1 seperately maybe someone else can also try to help

Explanation:

Question 2.

#include <iostream>

using namespace std;

// class BankAccount

class BankAccount{

  

    // instance variables

    private:

        int accountID;

        int balance;

  

    public:

      

        // constructor

        BankAccount(int accountID, int balance){

            this->accountID = accountID;

            this->balance = balance;

        }

      

        // getters and setters

        void setAccoutnId(int accountID){

            this->accountID = accountID;

        }

      

        int getAccountId(){

            return accountID;

        }

      

        void setBalance(int balance){

            this->balance = balance;

        }

      

        int balanceInquiry(){

            return balance;

        }

};

class CurrentAccount : public BankAccount{

  

    public:

  

        // constructor

        CurrentAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

      

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

        // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

};

class SavingsAccount : public BankAccount{

  

    public:

      

        // constructor

        SavingsAccount(int accountID, int balance):BankAccount(accountID,balance){

          

        }

  

        // function amount to withdraw

        void amountWithdrawn(int amount){

            setBalance(balanceInquiry()-amount);

        }

      

         // function to deposit amount

        void amountDeposit(int amount){

            setBalance(balanceInquiry()+amount);

        }

      

      

};

int main()

{

    // calling function of Current Account

    cout<<"Current Account : "<<endl;

    CurrentAccount current(122,100000);

    current.amountWithdrawn(10000);

    cout<<"Your balance after withdraw : ";

    cout<<current.balanceInquiry()<<endl;

    current.amountDeposit(30000);

    cout<<"Your balance after deposit : ";

    cout<<current.balanceInquiry()<<endl;

    cout<<endl<<endl;

  

    // calling function of Savings Account

    cout<<"Savings Account : "<<endl;

    SavingsAccount saving(125,80000);

    saving.amountWithdrawn(5000);

    cout<<"Your balance after withdraw : ";

    cout<<saving.balanceInquiry()<<endl;

    saving.amountDeposit(20000);

    cout<<"Your balance after deposit : ";

    cout<<saving.balanceInquiry();

    return 0;

}

4 0
3 years ago
Idea citizen activation
Tatiana [17]
<h2>Answer:</h2><h2>Idea citizen activation badge is a part of the idea silver award and is in the citizen category,helping you learn digital awareness,safety and ethics.</h2>

7 0
4 years ago
Read 2 more answers
Why should one avoid noise in the computer room​
iragen [17]
Is this a joke bc if so why?
5 0
3 years ago
Read 2 more answers
A company that manufactures machine parts orders a new system that makes products at ten times the speed of the earlier machine.
patriot [66]
Autonomic computing???????????????????????????????
7 0
3 years ago
If a document has several topics, and the first topic heading is set in 15-point bold Cambria type, the ________ buttons) can be
Ugo [173]

Answer:

C. Format Painter

Explanation:

The format painter tool in Word is used when the intention is to copy formatting from one document or item to another. For example, if a document has several topics, with the first topic heading set in 15-point Cambria font, the format painter button is used to apply those settings to all other topic headings. In other word, the format painter is used to copy formatting to another section of a text.

8 0
3 years ago
Other questions:
  • A ____ paragraph places the first character of a text line near the left border of a placeholder.
    14·1 answer
  • Jane, an employee in the human resources department, has created several important PDF documents on her computer that all office
    9·2 answers
  • Match the tool to the task it helps to accomplish. Thesaurus allows the user to find the synonyms and antonyms of a word Smart L
    8·1 answer
  • File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
    8·1 answer
  • Your mother wants to purchase a large hard drive for her computer and asks you to see what type of drive interface she has. Her
    13·1 answer
  • What term best describes when the scope of the project changes from what was initially agreed upon?
    8·1 answer
  • Hi, please help me.solution.​
    7·1 answer
  • Please answer<br><br>NO LINKS​
    7·1 answer
  • What is the first step in finding a solution to a problem? Choose a solution. Think of options to solve the problem. Try the sol
    6·1 answer
  • Write an if-else statement for the following: If user_tickets is less than 5, assign num_tickets with 1. Else, assign num_ticket
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!